diff --git a/lib/Cake/Event/CakeEventManager.php b/lib/Cake/Event/CakeEventManager.php index ef53ea4c17c..e2d9276e67c 100644 --- a/lib/Cake/Event/CakeEventManager.php +++ b/lib/Cake/Event/CakeEventManager.php @@ -166,8 +166,7 @@ protected function _extractCallable($function, $object) { */ 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 a2e704143e0..6c4bed1070a 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -581,11 +581,10 @@ public function mime() { */ 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(); } /**