diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index e06ff6c5c..27849c148 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -1138,7 +1138,7 @@ class CakeEmail { } $config = $configs->{$config}; } - $this->_config += $config; + $this->_config = array_merge($this->_config, $config); if (!empty($config['charset'])) { $this->charset = $config['charset']; } diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index 41878f138..87be7d57e 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -718,6 +718,11 @@ class CakeEmailTest extends CakeTestCase { $this->CakeEmail->config(array()); $this->assertSame($transportClass->config(), array()); + + $config = array('test' => 'test@example.com'); + $this->CakeEmail->config($config); + $expected = array('test' => 'test@example.com', 'test2' => true); + $this->assertSame($expected, $this->CakeEmail->config()); } /**