From 2f7810a36b488a1b3d3dfd3ba8eb6bfbbe91f9ff Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 19 Aug 2013 04:46:26 +0200 Subject: Ensure get_config() optional argument is an array, remove useless test --- system/core/Common.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/system/core/Common.php b/system/core/Common.php index a90a3ab70..50bcd9278 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -224,7 +224,7 @@ if ( ! function_exists('get_config')) * @param array * @return array */ - function &get_config($replace = array()) + function &get_config(array $replace = array()) { static $_config; @@ -266,14 +266,11 @@ if ( ! function_exists('get_config')) } // Are any values being dynamically replaced? - if (!empty($replace)) + foreach ($replace as $key => $val) { - foreach ($replace as $key => $val) + if (isset($config[$key])) { - if (isset($config[$key])) - { - $config[$key] = $val; - } + $config[$key] = $val; } } -- cgit v1.2.3-24-g4f1b