Skip to content

Commit 5dd358c

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: [Filesystem] Fix str_contains deprecation [Security] Correctly initialize the voter property [FrameworkBundle] Fix typo Update `changed-translation-files` step with native git diff command [Lock] Check the correct SQLSTATE error code for MySQL [ErrorHandler] Fix `ErrorHandlerTest::tearDown()` visibility [Lock] compatiblity with redis cluster 7 fix: typo
2 parents 1cabf3c + 116c7c5 commit 5dd358c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Store/PdoStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private function getCurrentTimestampStatement(): string
241241
private function isTableMissing(\PDOException $exception): bool
242242
{
243243
$driver = $this->getDriver();
244-
$code = $exception->getCode();
244+
$code = $exception->errorInfo ? $exception->errorInfo[1] : $exception->getCode();
245245

246246
return match ($driver) {
247247
'pgsql' => '42P01' === $code,

Store/RedisStore.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ private function getNowCode(): string
294294
try {
295295
$this->supportTime = 1 === $this->evaluate($script, 'symfony_check_support_time', []);
296296
} catch (LockStorageException $e) {
297-
if (!str_contains($e->getMessage(), 'commands not allowed after non deterministic')) {
297+
if (!str_contains($e->getMessage(), 'commands not allowed after non deterministic')
298+
&& !str_contains($e->getMessage(), 'is not allowed from script script')
299+
) {
298300
throw $e;
299301
}
300302
$this->supportTime = false;

0 commit comments

Comments
 (0)