Skip to content

[9.x] Fix TypeError in DeadlockException#42337

Merged
taylorotwell merged 1 commit intolaravel:9.xfrom
Brenneisen:type-error
May 10, 2022
Merged

[9.x] Fix TypeError in DeadlockException#42337
taylorotwell merged 1 commit intolaravel:9.xfrom
Brenneisen:type-error

Conversation

@Brenneisen
Copy link
Copy Markdown
Contributor

@Brenneisen Brenneisen commented May 10, 2022

Fixes #42317.

@driesvints
Copy link
Copy Markdown
Member

Like I said before, this doesn't seems the correct solution. It seems to me that this is a bug in PHP itself and that the PDOException needs its own constructor.

With this change, you're converting the string code into an integer which probably is wrong.

@Brenneisen Brenneisen changed the title Fix TypeErrpr in DeadlockException Fix TypeError in DeadlockException May 10, 2022
@taylorotwell
Copy link
Copy Markdown
Member

I believe we have had to do this other places as well in regards to PDO.

@taylorotwell
Copy link
Copy Markdown
Member

taylorotwell commented May 10, 2022

CleanShot 2022-05-10 at 10 08 05@2x

@taylorotwell taylorotwell merged commit 8aa4173 into laravel:9.x May 10, 2022
@GrahamCampbell GrahamCampbell changed the title Fix TypeError in DeadlockException [9.x] Fix TypeError in DeadlockException May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception::__construct(): Argument #2 ($code) must be of type int, string given at .../Illuminate/Database/Concerns/ManagesTransactions.php:94)

3 participants