Check session value before use

This commit is contained in:
Michal Zuber 2016-12-24 16:58:38 +07:00 committed by Dmitry Khomutov
parent d2ba729ded
commit dcd7f094a4

View file

@ -25,6 +25,10 @@ class User
*/
public function __call($method, $params = [])
{
if (empty($_SESSION['php-censor-user'])) {
return null;
}
$user = $_SESSION['php-censor-user'];
if (!is_object($user)) {