From cc8fdda813f25d05d5d307afb890cae8ecf4ebcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Nowacki?= Date: Fri, 30 Nov 2018 19:30:11 +0100 Subject: [PATCH] Update Connection.php #1559 - if there is no affected_rows set it is better to return 0 instead of exception :) --- system/Database/MySQLi/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index 96c263248c21..4b7162543648 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -343,7 +343,7 @@ protected function prepQuery($sql) */ public function affectedRows(): int { - return $this->connID->affected_rows; + return $this->connID->affected_rows ?? 0; } //--------------------------------------------------------------------