Skip to content

Commit e652aab

Browse files
authored
Merge pull request #5696 from morozov/remove-pgsql-exception-handling-workaround
Remove workaround for PHP bug in PostgreSQL exception handler
2 parents 06243b7 + a71d512 commit e652aab

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Driver/API/PostgreSQL/ExceptionConverter.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ public function convert(Exception $exception, ?Query $query): DriverException
7777
return new ConnectionException($exception, $query);
7878
}
7979

80-
// Prior to fixing https://bugs.php.net/bug.php?id=64705 (PHP 7.4.10),
81-
// in some cases (mainly connection errors) the PDO exception wouldn't provide a SQLSTATE via its code.
82-
// We have to match against the SQLSTATE in the error message in these cases.
83-
if ($exception->getCode() === 7 && str_contains($exception->getMessage(), 'SQLSTATE[08006]')) {
84-
return new ConnectionException($exception, $query);
85-
}
86-
8780
return new DriverException($exception, $query);
8881
}
8982
}

0 commit comments

Comments
 (0)