mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Make CakeSession::read() return null for all failure cases.
This commit is contained in:
parent
d16a63894e
commit
94e718372a
2 changed files with 2 additions and 2 deletions
|
@ -378,7 +378,7 @@ class CakeSession {
|
||||||
*/
|
*/
|
||||||
public static function read($name = null) {
|
public static function read($name = null) {
|
||||||
if (empty($name) && $name !== null) {
|
if (empty($name) && $name !== null) {
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
if (!self::_hasSession() || !self::start()) {
|
if (!self::_hasSession() || !self::start()) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -280,7 +280,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testReadyEmpty() {
|
public function testReadyEmpty() {
|
||||||
$this->assertFalse(TestCakeSession::read(''));
|
$this->assertNull(TestCakeSession::read(''));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue