From c48db361969f9aae771a32699aa39b0b287a37e4 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sun, 17 Apr 2011 11:53:12 -0400 Subject: [PATCH] Changed to be able to configure empty array in CakeEmail. --- lib/Cake/Network/CakeEmail.php | 2 +- lib/Cake/tests/Case/Network/CakeEmailTest.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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()); } /**