forked from Public/pics
Replace deprecated trigger_error calls with exceptions
This commit is contained in:
@@ -33,7 +33,7 @@ class Session
|
||||
public static function getSessionToken()
|
||||
{
|
||||
if (empty($_SESSION['session_token']))
|
||||
trigger_error('Call to getSessionToken without a session token being set!', E_USER_ERROR);
|
||||
throw new Exception('Call to getSessionToken without a session token being set!');
|
||||
|
||||
return $_SESSION['session_token'];
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class Session
|
||||
public static function getSessionTokenKey()
|
||||
{
|
||||
if (empty($_SESSION['session_token_key']))
|
||||
trigger_error('Call to getSessionTokenKey without a session token key being set!', E_USER_ERROR);
|
||||
throw new Exception('Call to getSessionTokenKey without a session token key being set!');
|
||||
|
||||
return $_SESSION['session_token_key'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user