From 3a7669bd1068f34022db08228baeefae2b27d05b Mon Sep 17 00:00:00 2001 From: Christopher Smith <chris@jalakai.co.uk> Date: Mon, 18 May 2015 20:32:49 +0100 Subject: [PATCH] Ensure single value negation is not affected by white space differences --- inc/confutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/confutils.php b/inc/confutils.php index e3805d74e..c587bed4d 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -365,12 +365,12 @@ function conf_decodeString($str) { function array_merge_with_removal($current, $new) { foreach ($new as $val) { if (substr($val,0,1) == '!') { - $idx = array_search(substr($val,1),$current); + $idx = array_search(trim(substr($val,1)),$current); if ($idx !== false) { unset($current[$idx]); } } else { - $current[] = $val; + $current[] = trim($val); } } -- GitLab