forked from GNUsocial/gnu-social
[CORE][Cache] Fix wrong return type in Cache::delete
This commit is contained in:
parent
1b45fb251a
commit
5dca5568b7
@ -204,7 +204,7 @@ abstract class Cache
|
||||
public static function delete(string $key, string $pool = 'default'): bool
|
||||
{
|
||||
if (isset(self::$redis[$pool])) {
|
||||
return self::$redis[$pool]->del($key);
|
||||
return self::$redis[$pool]->del($key) === 1;
|
||||
} else {
|
||||
return self::$pools[$pool]->delete($key);
|
||||
}
|
||||
@ -326,7 +326,7 @@ abstract class Cache
|
||||
public static function deleteList(string $key, string $pool = 'default'): bool
|
||||
{
|
||||
if (isset(self::$redis[$pool])) {
|
||||
return self::$redis[$pool]->del($key) == 1;
|
||||
return self::$redis[$pool]->del($key) === 1;
|
||||
} else {
|
||||
return self::delete($key, $pool);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user