Skip to content

Commit

Permalink
Dev: Test if user config['config'] is an array before array_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Oct 4, 2012
1 parent 8ed0a96 commit d85f0ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/core/LSYii_Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public function __construct($config = null)
if(file_exists(APPPATH . DIRECTORY_SEPARATOR. 'config' . DIRECTORY_SEPARATOR . 'config.php'))
{
$ls_config = require(APPPATH . DIRECTORY_SEPARATOR. 'config' . DIRECTORY_SEPARATOR . 'config.php');
$settings = array_merge($settings, $ls_config['config']);
if(is_array($ls_config['config']))
{
$settings = array_merge($settings, $ls_config['config']);
}
}

foreach ($settings as $key => $value)
Expand Down

0 comments on commit d85f0ae

Please sign in to comment.