Skip to content

Commit 4c638a9

Browse files
committed
fix: Type Error with PostgreSQL
Postgre driver returns string as error code.
1 parent 23e404d commit 4c638a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/CheckQueryReturnTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private function checkQueryReturn(bool $return): void
2121
$message = 'Query error: ' . $error['code'] . ', '
2222
. $error['message'] . ', query: ' . $this->db->getLastQuery();
2323

24-
throw new DatabaseException($message, $error['code']);
24+
throw new DatabaseException($message, (int) $error['code']);
2525
}
2626
}
2727

0 commit comments

Comments
 (0)