diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-04-14 13:37:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 13:37:23 +0200 |
commit | f031dd61c14a093effeb5773323f578abd65d54f (patch) | |
tree | 58fd8271e2eaf6e6c927a182faf3bb09ed70d2c0 /lib | |
parent | 644ce9e4f0245a29ffaa7e3161528aba4a87746b (diff) | |
parent | 9f5480eef4dcf36b9e31cfe85f9c56c7becc034d (diff) | |
download | nextcloud-server-f031dd61c14a093effeb5773323f578abd65d54f.tar.gz nextcloud-server-f031dd61c14a093effeb5773323f578abd65d54f.zip |
Merge pull request #26551 from nextcloud/fix/noid/redis-exists-bool
ensure redis returns bool for hasKey
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Http/Client/NegativeDnsCache.php | 2 | ||||
-rw-r--r-- | lib/private/Memcache/Redis.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Http/Client/NegativeDnsCache.php b/lib/private/Http/Client/NegativeDnsCache.php index 550d75a9c08..631fa19c90f 100644 --- a/lib/private/Http/Client/NegativeDnsCache.php +++ b/lib/private/Http/Client/NegativeDnsCache.php @@ -46,6 +46,6 @@ class NegativeDnsCache { } public function isNegativeCached(string $domain, int $type) : bool { - return $this->cache->hasKey($this->createCacheKey($domain, $type)); + return (bool)$this->cache->hasKey($this->createCacheKey($domain, $type)); } } diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php index 56470afa0c5..303b3afb67e 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -69,7 +69,7 @@ class Redis extends Cache implements IMemcacheTTL { } public function hasKey($key) { - return self::$cache->exists($this->getNameSpace() . $key); + return (bool)self::$cache->exists($this->getNameSpace() . $key); } public function remove($key) { |