Skip to content
Permalink
Browse files

a few more corrections

  • Loading branch information...
dereuromark committed Apr 7, 2014
1 parent 0ece694 commit a7744e6ff41b225432c85946ac6aa75612f4c7ee
@@ -264,7 +264,7 @@ public function bake($configs) {
$temp = get_class_vars(get_class($db));
foreach ($temp as $configName => $info) {
$info = array_merge($this->_defaultConfig, $info);
$info += $this->_defaultConfig;
if (!isset($info['schema'])) {
$info['schema'] = null;
@@ -307,7 +307,7 @@ public function bake($configs) {
$out .= "class DATABASE_CONFIG {\n\n";
foreach ($configs as $config) {
$config = array_merge($this->_defaultConfig, $config);
$config += $this->_defaultConfig;
extract($config);
if (strpos($datasource, 'Database/') === false) {
@@ -92,7 +92,7 @@ public function __construct(ComponentCollection $collection, $settings = array()
*/
public function __get($name) {
if (isset($this->_componentMap[$name]) && !isset($this->{$name})) {
$settings = array_merge((array)$this->_componentMap[$name]['settings'], array('enabled' => false));
$settings = array('enabled' => false) + (array)$this->_componentMap[$name]['settings'];
$this->{$name} = $this->_Collection->load($this->_componentMap[$name]['class'], $settings);
}
if (isset($this->{$name})) {
@@ -1135,7 +1135,7 @@ public function send($content = null) {
if (!is_array($this->_config['log'])) {
$this->_config['log'] = array('level' => $this->_config['log']);
}
$config = array_merge($config, $this->_config['log']);
$config = $this->_config['log'] + $config;
}
CakeLog::write(
$config['level'],
@@ -1199,7 +1199,7 @@ protected function _applyConfig($config) {
}
$config = $configs->{$config};
}
$this->_config = array_merge($this->_config, $config);
$this->_config = $config + $this->_config;
if (!empty($config['charset'])) {
$this->charset = $config['charset'];
}
@@ -119,7 +119,7 @@ public static function init($class, $strict = false) {
if (is_array($settings)) {
$pluginPath = null;
$settings = array_merge($defaults, $settings);
$settings += $defaults;
$class = $settings['class'];
list($plugin, $class) = pluginSplit($class);

0 comments on commit a7744e6

Please sign in to comment.
You can’t perform that action at this time.