From 471e3d8954242779c32b2d0ae638883aacf14445 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 23 Apr 2019 10:54:26 +0300 Subject: [PATCH] Revert "Use Null Coalesce Operator (#2466)" This reverts commit be8eb639 --- system/src/Grav/Framework/Cache/Adapter/MemoryCache.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php b/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php index ea502dc4c..2d0fe40bd 100644 --- a/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php @@ -27,7 +27,11 @@ class MemoryCache extends AbstractCache public function doGet($key, $miss) { - return $this->cache[$key] ?? $miss; + if (!array_key_exists($key, $this->cache)) { + return $miss; + } + + return $this->cache[$key]; } public function doSet($key, $value, $ttl)