Skip to content

Commit cc8fdda

Browse files
authored
Update Connection.php
#1559 - if there is no affected_rows set it is better to return 0 instead of exception :)
1 parent 1680e90 commit cc8fdda

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Database/MySQLi/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ protected function prepQuery($sql)
343343
*/
344344
public function affectedRows(): int
345345
{
346-
return $this->connID->affected_rows;
346+
return $this->connID->affected_rows ?? 0;
347347
}
348348

349349
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)