From 852bf162b43fb2df4bff5f426ff237a7bdf67615 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 6 May 2015 19:16:48 +0000 Subject: [PATCH] config : trim the arrays contents to be correctely detected git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2149 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- config.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.php b/config.php index 1fbb0fe..2942897 100644 --- a/config.php +++ b/config.php @@ -185,11 +185,14 @@ class config $new = array (); foreach ($values as $key=>$val) { + $val = trim ($val); if (strpos ($val, "=>") !== false) { // Associated array unset ($values[$key]); list ($key1, $val1) = explode ("=>", $val); + $key1 = trim ($key1); + $val1 = trim ($val1); if ($val1[0] === "\"" || $val1[0] === "'") $val1 = substr($val1, 1, -1); elseif (strpos ($val1, "."))