Skip to content

Commit f5973d7

Browse files
committed
haproxy::backend: Always set $_sort_options_alphabetic
Without this there's a possiblity that the variable isn't defined. This leads to an unreferenced variable call in line 133.
1 parent b90a36e commit f5973d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manifests/backend.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@
109109
if $picked_sort_options_alphabetic == false {
110110
$_sort_options_alphabetic = $picked_sort_options_alphabetic
111111
} else {
112-
if $options.is_a(Hash) and 'option' in $options {
112+
if $options =~ Hash and 'option' in $options {
113113
if ('httpchk' in $options['option']) {
114114
warning('Overriding the value of $sort_options_alphabetic to "false" due to "httpchk" option defined')
115115
$_sort_options_alphabetic = false
116+
} else {
117+
$_sort_options_alphabetic = $picked_sort_options_alphabetic
116118
}
117119
} else {
118120
$_sort_options_alphabetic = $picked_sort_options_alphabetic

0 commit comments

Comments
 (0)