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
This commit is contained in:
2015-05-06 19:16:48 +00:00
parent 6b21c41ff9
commit 852bf162b4

View File

@@ -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, "."))