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 73e03fb

Browse filesBrowse files
bug #47979 [Cache] Fix dealing with ext-redis' multi/exec returning a bool (João Nogueira)
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] Fix dealing with ext-redis' multi/exec returning a bool | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46384 | License | MIT When using `phpredis` client, the execution of `multi/exec` might return a boolean instead of an array, leading to an error when yielding the result. Commits ------- 4d2b176 [Cache] Fix dealing with ext-redis' multi/exec returning a bool
2 parents 70b403d + 4d2b176 commit 73e03fb
Copy full SHA for 73e03fb

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎src/Symfony/Component/Cache/Traits/RedisTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Traits/RedisTrait.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,11 @@ private function pipeline(\Closure $generator, object $redis = null): \Generator
567567

568568
if (!$redis instanceof \Predis\ClientInterface && 'eval' === $command && $redis->getLastError()) {
569569
$e = new \RedisException($redis->getLastError());
570-
$results = array_map(function ($v) use ($e) { return false === $v ? $e : $v; }, $results);
570+
$results = array_map(function ($v) use ($e) { return false === $v ? $e : $v; }, (array) $results);
571+
}
572+
573+
if (\is_bool($results)) {
574+
return;
571575
}
572576

573577
foreach ($ids as $k => $id) {

0 commit comments

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