From d5a6089465abfa8b83b75b3afc821e1c0455268b Mon Sep 17 00:00:00 2001 From: wangyuting Date: Thu, 28 Aug 2025 16:43:35 +0800 Subject: [PATCH] * [bug#65031,done,0.2h,0h] Fix sql repalce exec error. --- lib/cache/cache.class.php | 2 +- lib/dbh/dbh.class.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cache/cache.class.php b/lib/cache/cache.class.php index fe773c4532..5a4acb082b 100644 --- a/lib/cache/cache.class.php +++ b/lib/cache/cache.class.php @@ -454,7 +454,7 @@ class cache */ private function delete() { - if(empty($this->objects)) return; + if(empty($this->objects)) return $this->log('No objects to delete.', __FILE__, __LINE__); $code = $this->getTableCode(); $setCacheKey = $this->getSetCacheKey($code); diff --git a/lib/dbh/dbh.class.php b/lib/dbh/dbh.class.php index 44c1f95ff4..83f306d17a 100644 --- a/lib/dbh/dbh.class.php +++ b/lib/dbh/dbh.class.php @@ -244,7 +244,8 @@ class dbh { $result = false; $begin = microtime(true); - $result = $this->pdo->query($sql); + $method = $mode == 'exec' ? 'exec' : 'query'; + $result = $this->pdo->$method($sql); $duration = microtime(true) - $begin; } catch(PDOException $e)