From 9927e3ed4e0a9c8602d0249fba61fd606fa792d0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 7 Jul 2011 07:39:48 -0700 Subject: [PATCH] Tweak APC cache driver to return null for default value. --- system/cache/driver/apc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/system/cache/driver/apc.php b/system/cache/driver/apc.php index 93803045..ab210922 100644 --- a/system/cache/driver/apc.php +++ b/system/cache/driver/apc.php @@ -24,10 +24,9 @@ public function has($key) * Get an item from the cache. * * @param string $key - * @param mixed $default * @return mixed */ - public function get($key, $default = null) + public function get($key) { if (array_key_exists($key, $this->items)) { @@ -38,7 +37,7 @@ public function get($key, $default = null) if ($cache === false) { - return is_callable($default) ? call_user_func($default) : $default; + return null; } return $this->items[$key] = $cache;