diff --git a/config.php b/config.php index 3624d71..108d0b2 100644 --- a/config.php +++ b/config.php @@ -66,7 +66,18 @@ class config if ($rc !== 1) throw new Exception ("Error in configuration file"); if (array_key_exists ($param, $conf)) + { + if (! is_array ($conf[$param])) + return $conf[$param]; + // if the configuration is an array, check if all the keys are defined + // or use the default + foreach ($this->default[$param] as $key=>$val) + { + if (! isset ($conf[$param][$key])) + $conf[$param][$key] = $val; + } return $conf[$param]; + } return $this->default[$param]; }