diff --git a/src/Network/Session.php b/src/Network/Session.php index cfaf3d1d391..5a42e359956 100644 --- a/src/Network/Session.php +++ b/src/Network/Session.php @@ -349,6 +349,10 @@ public function check($name = null) { if ($this->_hasSession() && !$this->started()) { $this->start(); } + + if (!isset($_SESSION)) { + return null; + } return Hash::get($_SESSION, $name) !== null; }