Skip to content

Commit

Permalink
Changed to be able to configure empty array in CakeEmail.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Apr 17, 2011
1 parent c5f289f commit c48db36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Network/CakeEmail.php
Expand Up @@ -784,7 +784,7 @@ public function message() {
* @return mixed
*/
public function config($config = null) {
if (empty($config)) {
if ($config === null) {
return $this->_config;
}

Expand Down
4 changes: 4 additions & 0 deletions lib/Cake/tests/Case/Network/CakeEmailTest.php
Expand Up @@ -456,6 +456,10 @@ public function testConfig() {
$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());
}

/**
Expand Down

0 comments on commit c48db36

Please sign in to comment.