diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-09-30 13:55:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 13:55:30 +0300 |
commit | 5660589ca92bc800c046eff3057e0e675d49819b (patch) | |
tree | 9e4f1395b311ccce80a45332a61a5895bb1f66bc | |
parent | f2d7d1357901930f86829a81069c6c8c4b77a088 (diff) | |
parent | 8aed08e058c53f8f4e52dafdc21fed6aa172f8ce (diff) |
Merge pull request #34340 from nextcloud/backport/34328/stable25
[stable25] Correctly handle Redis::keys returning false
-rw-r--r-- | build/stubs/redis.php | 2 | ||||
-rw-r--r-- | lib/private/Memcache/Redis.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/build/stubs/redis.php b/build/stubs/redis.php index e4872b81556..1a91e942fc4 100644 --- a/build/stubs/redis.php +++ b/build/stubs/redis.php @@ -2177,7 +2177,7 @@ class Redis * * @param string $pattern pattern, using '*' as a wildcard * - * @return array string[] The keys that match a certain pattern. + * @return string[]|false The keys that match a certain pattern. * * @link https://redis.io/commands/keys * @example diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php index 9b07da2d99c..de38033ca32 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -78,7 +78,7 @@ class Redis extends Cache implements IMemcacheTTL { $keys = self::$cache->keys($prefix); $deleted = self::$cache->del($keys); - return count($keys) === $deleted; + return (is_array($keys) && (count($keys) === $deleted)); } /** |