8000 [Cache] Fix return type of `Redis6Proxy::mget()` by alexandre-daubois · Pull Request #52700 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Symfony/Component/Cache/Traits/Redis6Proxy.php
6C70
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,14 @@ public function ltrim($key, $start, $end): \Redis|bool

public function mget($keys): \Redis|array
{
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args());
/**
* Handle the special case where `mget()` returns false, waiting for the stub to be fixed.
*
* @see https://github.com/phpredis/phpredis/issues/1810
*/
$v = ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args());

return $v === false ? [] : $v;
}

public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Redis|bool
Expand Down
0