Changed to be able to configure empty array in CakeEmail.

This commit is contained in:
Juan Basso 2011-04-17 11:53:12 -04:00
parent c5f289fccf
commit c48db36196
2 changed files with 5 additions and 1 deletions

View file

@ -784,7 +784,7 @@ class CakeEmail {
* @return mixed
*/
public function config($config = null) {
if (empty($config)) {
if ($config === null) {
return $this->_config;
}

View file

@ -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());
}
/**