diff --git a/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php b/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php index 2d0fe40bd..ea502dc4c 100644 --- a/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php @@ -27,11 +27,7 @@ class MemoryCache extends AbstractCache public function doGet($key, $miss) { - if (!array_key_exists($key, $this->cache)) { - return $miss; - } - - return $this->cache[$key]; + return $this->cache[$key] ?? $miss; } public function doSet($key, $value, $ttl)