summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2013-08-19 04:46:26 +0200
committervlakoff <vlakoff@gmail.com>2013-08-19 04:46:26 +0200
commit2f7810a36b488a1b3d3dfd3ba8eb6bfbbe91f9ff (patch)
tree2c517e6da95d34a8bcd0e4b16758a855cb07af4e
parent8d70c0af8f395cfa6354e4e586b156f65954fca3 (diff)
Ensure get_config() optional argument is an array, remove useless test
-rw-r--r--system/core/Common.php11
1 files 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;
}
}