Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7318816

Browse filesBrowse files
edomatonicolas-grekas
authored andcommitted
[Lock] Check the correct SQLSTATE error code for MySQL
* Closes bug: #54091 Signed-off-by: Ernesto Domato <edomato@gmail.com>
1 parent 7dae80d commit 7318816
Copy full SHA for 7318816

File tree

2 files changed

+2
-2
lines changed
Filter options

2 files changed

+2
-2
lines changed

‎src/Symfony/Component/Cache/Adapter/PdoAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PdoAdapter.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ private function getServerVersion(): string
600600
private function isTableMissing(\PDOException $exception): bool
601601
{
602602
$driver = $this->driver;
603-
$code = $exception->getCode();
603+
$code = $exception->errorInfo ? $exception->errorInfo[1] : $exception->getCode();
604604

605605
switch (true) {
606606
case 'pgsql' === $driver && '42P01' === $code:

‎src/Symfony/Component/Lock/Store/PdoStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/PdoStore.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ private function getCurrentTimestampStatement(): string
330330
private function isTableMissing(\PDOException $exception): bool
331331
{
332332
$driver = $this->getDriver();
333-
$code = $exception->getCode();
333+
$code = $exception->errorInfo ? $exception->errorInfo[1] : $exception->getCode();
334334

335335
switch (true) {
336336
case 'pgsql' === $driver && '42P01' === $code:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.