From fdd857aa97feb245fc0e7f656f3a8fb5ad3d5ce1 Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 11 Oct 2024 16:02:41 +0800 Subject: [PATCH] * [refac] fix apache process exiting caused by pdo error. --- lib/base/dao/dao.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/base/dao/dao.class.php b/lib/base/dao/dao.class.php index 6e1a4fc922..42aa405896 100644 --- a/lib/base/dao/dao.class.php +++ b/lib/base/dao/dao.class.php @@ -921,8 +921,6 @@ class baseDAO */ public function query($sql = '') { - if(!empty(dao::$errors)) return $this; - if($sql) { $sql = $this->dbh->formatSQL($sql); @@ -1030,7 +1028,7 @@ class baseDAO */ public function exec($sql = '') { - if(!empty(dao::$errors)) return $this; + if(!empty(dao::$errors)) return 0; if($sql) {