diff --git a/lib/Cake/Event/CakeEventManager.php b/lib/Cake/Event/CakeEventManager.php index ef53ea4c1..e2d9276e6 100644 --- a/lib/Cake/Event/CakeEventManager.php +++ b/lib/Cake/Event/CakeEventManager.php @@ -166,8 +166,7 @@ class CakeEventManager { */ public function detach($callable, $eventKey = null) { if ($callable instanceof CakeEventListener) { - $this->_detachSubscriber($callable, $eventKey); - return; + return $this->_detachSubscriber($callable, $eventKey); } if (empty($eventKey)) { foreach (array_keys($this->_listeners) as $eventKey) { diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index a2e704143..6c4bed107 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -581,11 +581,10 @@ class File { */ public function clearStatCache($all = false) { if ($all === false && version_compare(PHP_VERSION, '5.3.0') >= 0) { - clearstatcache(true, $this->path); - return; + return clearstatcache(true, $this->path); } - clearstatcache(); + return clearstatcache(); } /**