Partial fix for #504 - No error checking in the User helper

This commit is contained in:
Dan Cryer 2014-07-29 15:51:53 +01:00
parent 926ef097d4
commit 6324c40757

View file

@ -20,6 +20,11 @@ class User
public function __call($method, $params = array())
{
$user = $_SESSION['user'];
if (!is_object($user)) {
return null;
}
return call_user_func_array(array($user, $method), $params);
}
}