diff --git a/lib/Cake/Network/CakeEmail.php b/lib/Cake/Network/CakeEmail.php index e87739c28..18662a7a8 100644 --- a/lib/Cake/Network/CakeEmail.php +++ b/lib/Cake/Network/CakeEmail.php @@ -784,7 +784,7 @@ class CakeEmail { * @return mixed */ public function config($config = null) { - if (empty($config)) { + if ($config === null) { return $this->_config; } diff --git a/lib/Cake/tests/Case/Network/CakeEmailTest.php b/lib/Cake/tests/Case/Network/CakeEmailTest.php index f75b017bc..6b8097371 100644 --- a/lib/Cake/tests/Case/Network/CakeEmailTest.php +++ b/lib/Cake/tests/Case/Network/CakeEmailTest.php @@ -456,6 +456,10 @@ class CakeEmailTest extends CakeTestCase { $config = array('test' => 'ok', 'test2' => true); $this->CakeEmail->config($config); $this->assertIdentical(DebugTransport::$config, $config); + $this->assertIdentical($this->CakeEmail->config(), $config); + + $this->CakeEmail->config(array()); + $this->assertIdentical(DebugTransport::$config, array()); } /**