Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-09-29 15:41:53 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-09-29 15:41:53 +0300
commit826e234ecfa37b831df85c80606df6875574527f (patch)
tree1acf25c04293da9803dc9a04a01edb02cdf84f19
parentd647025f616c95137be269cc7467c23671a08aa2 (diff)
Correctly handle Redis::keys returning falsefix/fix-redis-type-error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--build/stubs/redis.php2
-rw-r--r--lib/private/Memcache/Redis.php2
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));
}
/**