mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Changed to be able to configure empty array in CakeEmail.
This commit is contained in:
parent
c5f289fccf
commit
c48db36196
2 changed files with 5 additions and 1 deletions
|
@ -784,7 +784,7 @@ class CakeEmail {
|
|||
* @return mixed
|
||||
*/
|
||||
public function config($config = null) {
|
||||
if (empty($config)) {
|
||||
if ($config === null) {
|
||||
return $this->_config;
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue