diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index bdf344a5b..e105bc9ec 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -291,8 +291,7 @@ class CookieComponent extends Component { if (empty($key)) { return false; } - $result = $this->read($key); - return isset($result); + return $this->read($key) !== null; } /** diff --git a/lib/Cake/Core/Configure.php b/lib/Cake/Core/Configure.php index f2101f795..0d1b27478 100644 --- a/lib/Cake/Core/Configure.php +++ b/lib/Cake/Core/Configure.php @@ -180,8 +180,7 @@ class Configure { if (empty($var)) { return false; } - $result = Hash::get(self::$_values, $var); - return isset($result); + return Hash::get(self::$_values, $var) !== null; } /** diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 6baab1d5b..ff13c0ca6 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -218,8 +218,7 @@ class CakeSession { if (empty($name)) { return false; } - $result = Hash::get($_SESSION, $name); - return isset($result); + return Hash::get($_SESSION, $name) !== null; } /** @@ -283,9 +282,8 @@ class CakeSession { protected static function _error($errorNumber) { if (!is_array(self::$error) || !array_key_exists($errorNumber, self::$error)) { return false; - } else { - return self::$error[$errorNumber]; } + return self::$error[$errorNumber]; } /**