Partial fix for #504 - No error checking in the User helper
This commit is contained in:
parent
926ef097d4
commit
6324c40757
|
@ -20,6 +20,11 @@ class User
|
||||||
public function __call($method, $params = array())
|
public function __call($method, $params = array())
|
||||||
{
|
{
|
||||||
$user = $_SESSION['user'];
|
$user = $_SESSION['user'];
|
||||||
|
|
||||||
|
if (!is_object($user)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return call_user_func_array(array($user, $method), $params);
|
return call_user_func_array(array($user, $method), $params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue