From 2dc471cc3715ed495a1db01165c46971d433366f Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 23 May 2024 13:20:29 +0800 Subject: [PATCH] * baseRouter: fix error of calling fetch method on bool. --- framework/base/router.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 43fa948530..afcbf758b4 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -485,7 +485,7 @@ class baseRouter $this->setClient(); - if($mode == 'running') $this->loadCacheConfig(); + $this->loadCacheConfig(); } /** @@ -2785,6 +2785,9 @@ class baseRouter */ public function loadCacheConfig() { + if(!$this->isServing()) return false; + if(!isset($this->config->installed) || !$this->config->installed) return false; + $globalCache = $this->dbQuery("SELECT value FROM " . TABLE_CONFIG . " WHERE `module` = 'common' AND `section` = 'global' AND `key` = 'cache' LIMIT 1")->fetch(); if(!$globalCache) return false;