From c3e08fde308ad6ed488ecff4fc5cd3618d99b645 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 28 Sep 2015 22:52:51 +0530 Subject: [PATCH] Load config file before checking class existence. Closes #7465 --- lib/Cake/Network/Email/CakeEmail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 823c85f65..027cd539d 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -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');