8000 Merge branch '5.4' into 6.0 · symfony/cache@079ec0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 079ec0a

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Cache] Fix possibly null value passed to preg_match() in RedisTrait
2 parents 5aba102 + a33fa08 commit 079ec0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public static function createConnection(string $dsn, array $options = []): \Redi
228228
restore_error_handler();
229229
}
230230
if (!$isConnected) {
231-
$error = preg_match('/^Redis::p?connect\(\): (.*)/', $error, $error) ? sprintf(' (%s)', $error[1]) : '';
231+
$error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? '', $error) ? sprintf(' (%s)', $error[1]) : '';
232232
throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$error.'.');
233233
}
234234

0 commit comments

Comments
 (0)
0