Skip to content

Commit 3745b0a

Browse files
fix: compare the MySQL deadlock code without an int cast
mysqli_sql_exception::getCode() is already an int. Rector rejects the redundant cast. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e3e3644 commit 3745b0a

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
@@ -308,7 +308,7 @@ protected function execute(string $sql)
308308
'trace' => render_backtrace($e->getTrace()),
309309
]);
310310

311-
if ((int) $e->getCode() === 1213 && $this->transDepth > 0) {
311+
if ($e->getCode() === 1213 && $this->transDepth > 0) {
312312
$this->markServerRolledBackTransaction();
313313
}
314314

0 commit comments

Comments
 (0)