a few more corrections

This commit is contained in:
euromark 2014-04-08 01:49:33 +02:00
parent 0ece694a75
commit a7744e6ff4
4 changed files with 6 additions and 6 deletions

View file

@ -264,7 +264,7 @@ class DbConfigTask extends AppShell {
$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 @@ class DbConfigTask extends AppShell {
$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) {

View file

@ -92,7 +92,7 @@ class Component extends Object {
*/
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})) {

View file

@ -1135,7 +1135,7 @@ class CakeEmail {
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 @@ class CakeEmail {
}
$config = $configs->{$config};
}
$this->_config = array_merge($this->_config, $config);
$this->_config = $config + $this->_config;
if (!empty($config['charset'])) {
$this->charset = $config['charset'];
}

View file

@ -119,7 +119,7 @@ class ClassRegistry {
if (is_array($settings)) {
$pluginPath = null;
$settings = array_merge($defaults, $settings);
$settings += $defaults;
$class = $settings['class'];
list($plugin, $class) = pluginSplit($class);