diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 96a66d899..6d7d53a20 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -378,7 +378,7 @@ class CakeSession { */ public static function read($name = null) { if (empty($name) && $name !== null) { - return false; + return null; } if (!self::_hasSession() || !self::start()) { return null; diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php index 7f70ea82c..534aaa1ed 100644 --- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php @@ -280,7 +280,7 @@ class CakeSessionTest extends CakeTestCase { * @return void */ public function testReadyEmpty() { - $this->assertFalse(TestCakeSession::read('')); + $this->assertNull(TestCakeSession::read('')); } /**