瀏覽代碼

Correctly handle Redis::keys returning false

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tags/v26.0.0beta1
Côme Chilliet 1 年之前
父節點
當前提交
826e234ecf
No account linked to committer's email address
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      build/stubs/redis.php
  2. 1
    1
      lib/private/Memcache/Redis.php

+ 1
- 1
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

+ 1
- 1
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));
}

/**

Loading…
取消
儲存