From fbbc060ed0fe7e4baedaead02d5ad9bfb2bae05b Mon Sep 17 00:00:00 2001 From: wangyuting Date: Mon, 17 Jun 2024 18:16:01 +0800 Subject: [PATCH] * [misc] Fix errors during installation. --- framework/router.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/router.class.php b/framework/router.class.php index ff5c26ccec..49fbdd8e39 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -217,7 +217,8 @@ class router extends baseRouter */ public function mergeFlowLang() { - if(defined('IN_UPGRADE')) return; + if(!$this->dbh || empty($this->config->db->name)) return; + if($this->installing || $this->upgrading) return; $flows = $this->dbQuery('SELECT * FROM ' . TABLE_WORKFLOW . " WHERE `buildin` = 0 AND `vision` = '{$this->config->vision}' AND status = 'normal' AND type = 'flow' AND `navigator` = 'primary'")->fetchAll(); foreach($flows as $flow) $this->lang->mainNav->{$flow->module} = "{$this->lang->navIcons['workflow']} {$flow->name}|{$flow->module}|browse|";