From 695190dc823e44c3c86804f4e291b1585125dd0b Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 20 Jun 2014 15:57:24 -0300 Subject: Fix call-time pass by reference for haproxy-stable package --- config/haproxy-stable/haproxy_pool_edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/haproxy-stable/haproxy_pool_edit.php') diff --git a/config/haproxy-stable/haproxy_pool_edit.php b/config/haproxy-stable/haproxy_pool_edit.php index 1e9958eb..51eb4e28 100755 --- a/config/haproxy-stable/haproxy_pool_edit.php +++ b/config/haproxy-stable/haproxy_pool_edit.php @@ -72,7 +72,11 @@ if ($_POST) { $reqdfields = explode(" ", "name"); $reqdfieldsn = explode(",", "Name"); - 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 (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['name'])) $input_errors[] = "The field 'Name' contains invalid characters."; -- cgit v1.2.3