From eb5786a191acc4052dfed83cf77d297580792fd4 Mon Sep 17 00:00:00 2001 From: nivcoo Date: Mon, 6 Dec 2021 21:57:20 +0100 Subject: [PATCH] improv. fix weird issue with initialize function --- app/Controller/Component/UtilComponent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Controller/Component/UtilComponent.php b/app/Controller/Component/UtilComponent.php index 55c64946..5c6cf39d 100755 --- a/app/Controller/Component/UtilComponent.php +++ b/app/Controller/Component/UtilComponent.php @@ -15,7 +15,7 @@ class UtilComponent extends CakeObject private $smtpOptions = []; - private $db_type; + private $db_type = "mysql"; function shutdown($controller) { @@ -37,11 +37,11 @@ function initialize($controller) $this->controller->Configuration = ClassRegistry::init('Configuration'); } - $this->db_type = ConnectionManager::$config->default['datasource']; } function startup($controller) { + $this->db_type = ConnectionManager::$config->default['datasource']; } // Get ip (support cloudfare)