From ac055a715a9bb98929671e52f442b9dcd37124e4 Mon Sep 17 00:00:00 2001 From: Gilbert Pellegrom Date: Sat, 27 Apr 2013 17:17:08 +0100 Subject: [PATCH] Fix get_config() function #13. --- config.php | 4 ++-- index.php | 1 - lib/pico.php | 12 +++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/config.php b/config.php index 74b509b..56b5b2a 100644 --- a/config.php +++ b/config.php @@ -1,14 +1,14 @@ 'Pico', @@ -118,11 +121,10 @@ class Pico { 'enable_cache' => false ); - foreach($defaults as $key=>$val){ - if(isset($config[$key]) && $config[$key]) $defaults[$key] = $config[$key]; - } + if(is_array($config)) $config = array_merge($defaults, $config); + else $config = $defaults; - return $defaults; + return $config; } /**