diff --git a/lib/private/Http/Client/NegativeDnsCache.php b/lib/private/Http/Client/NegativeDnsCache.php index 550d75a9c08a6..631fa19c90f96 100644 --- a/lib/private/Http/Client/NegativeDnsCache.php +++ b/lib/private/Http/Client/NegativeDnsCache.php @@ -46,6 +46,6 @@ public function setNegativeCacheForDnsType(string $domain, int $type, int $ttl) } 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 56470afa0c5c8..303b3afb67ea5 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -69,7 +69,7 @@ public function set($key, $value, $ttl = 0) { } public function hasKey($key) { - return self::$cache->exists($this->getNameSpace() . $key); + return (bool)self::$cache->exists($this->getNameSpace() . $key); } public function remove($key) {