mirror of https://github.com/nextcloud/server
Merge pull request #34328 from nextcloud/fix/fix-redis-type-error
Correctly handle Redis::keys returning false
This commit is contained in:
commit
534fbd83e3
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue