Load config file before checking class existence.

Closes #7465
This commit is contained in:
ADmad 2015-09-28 22:52:51 +05:30
parent dad9eaab90
commit c3e08fde30

View file

@ -360,7 +360,7 @@ class CakeEmail {
if ($config) {
$this->config($config);
} elseif (class_exists($this->_configClass) && config('email')) {
} elseif (config('email') && class_exists($this->_configClass)) {
$this->_configInstance = new $this->_configClass();
if (isset($this->_configInstance->default)) {
$this->config('default');