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)