From 7051ab51a12cc3b94adb987d99a04126dd67b3a7 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 9 May 2014 14:53:41 -0400 Subject: Fix call-time pass-by-reference in haproxy --- config/haproxy/haproxy_global.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/haproxy/haproxy_global.php') diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php index 16f5152d..40b5cd90 100755 --- a/config/haproxy/haproxy_global.php +++ b/config/haproxy/haproxy_global.php @@ -59,7 +59,11 @@ if ($_POST) { if ($_POST['carpdev'] == "disabled") unset($_POST['carpdev']); - do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); + if ($pf_version < 2.1) + $input_errors = eval('do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); return $input_errors;'); + else + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); if ($_POST['maxconn'] && (!is_numeric($_POST['maxconn']))) $input_errors[] = "The maximum number of connections should be numeric."; -- cgit v1.2.3