Permalink
Browse files

Make CakeSession::read() return null for all failure cases.

  • Loading branch information...
ADmad committed Oct 9, 2014
1 parent d16a638 commit 94e718372a4a01089a487318e85b07174287fd81
@@ -378,7 +378,7 @@ public static function userAgent($userAgent = null) {
*/
public static function read($name = null) {
if (empty($name) && $name !== null) {
- return false;
+ return null;
}
if (!self::_hasSession() || !self::start()) {
return null;
@@ -280,7 +280,7 @@ public function testSimpleRead() {
* @return void
*/
public function testReadyEmpty() {
- $this->assertFalse(TestCakeSession::read(''));
+ $this->assertNull(TestCakeSession::read(''));
}
/**

0 comments on commit 94e7183

Please sign in to comment.