From 4cf8fc6eb5cbcd2fca196cdc7504781dca8397c5 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 27 Sep 2023 15:45:45 +0900 Subject: [PATCH] Be a little more lenient on invalid querystrings passed to deprecated method --- common/framework/DB.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/framework/DB.php b/common/framework/DB.php index b7dd609fd..ace3d46c6 100644 --- a/common/framework/DB.php +++ b/common/framework/DB.php @@ -1297,9 +1297,9 @@ class DB * * @deprecated * @param string $query_string - * @return Helpers\DBStmtHelper + * @return ?Helpers\DBStmtHelper */ - public function _query($query_string): Helpers\DBStmtHelper + public function _query($query_string): ?Helpers\DBStmtHelper { if ($this->_debug_comment) { @@ -1308,7 +1308,7 @@ class DB $this->_last_stmt = null; $this->_last_stmt = $this->_handle->query(strval($query_string)); - return $this->_last_stmt; + return $this->_last_stmt ?: null; } /**