Skip to content

Commit cca0c5f

Browse files
Throwable error code can only be an integer (#39280)
* Throwable error code can only be an integer * Update DetectsConcurrencyErrors.php Co-authored-by: Taylor Otwell <[email protected]>
1 parent 024067f commit cca0c5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/DetectsConcurrencyErrors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait DetectsConcurrencyErrors
1616
*/
1717
protected function causedByConcurrencyError(Throwable $e)
1818
{
19-
if ($e instanceof PDOException && $e->getCode() === '40001') {
19+
if ($e instanceof PDOException && ($e->getCode() === 40001 || $e->getCode() === '40001')) {
2020
return true;
2121
}
2222

0 commit comments

Comments
 (0)