Ver código fonte

Correctly handle Redis::keys returning false

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tags/v26.0.0beta1
Côme Chilliet 1 ano atrás
pai
commit
826e234ecf
Nenhuma conta vinculada ao e-mail do autor do commit
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1
    1
      build/stubs/redis.php
  2. 1
    1
      lib/private/Memcache/Redis.php

+ 1
- 1
build/stubs/redis.php Ver arquivo

* *
* @param string $pattern pattern, using '*' as a wildcard * @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 * @link https://redis.io/commands/keys
* @example * @example

+ 1
- 1
lib/private/Memcache/Redis.php Ver arquivo

$keys = self::$cache->keys($prefix); $keys = self::$cache->keys($prefix);
$deleted = self::$cache->del($keys); $deleted = self::$cache->del($keys);


return count($keys) === $deleted;
return (is_array($keys) && (count($keys) === $deleted));
} }


/** /**

Carregando…
Cancelar
Salvar