Skip to content

Commit

Permalink
Revert "Use Null Coalesce Operator (#2466)"
Browse files Browse the repository at this point in the history
This reverts commit be8eb63
  • Loading branch information
mahagr committed Apr 23, 2019
1 parent 74988f1 commit 471e3d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion system/src/Grav/Framework/Cache/Adapter/MemoryCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 471e3d8

Please sign in to comment.