Skip to content
Snippets Groups Projects
Commit 70826728 authored by Olav Morken's avatar Olav Morken
Browse files

Auth_State: Make loadExceptionState return NULL if no exception was passed to the current page.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1995 44740490-163a-0410-bde0-09ae8108e29a
parent 01838c7b
No related branches found
No related tags found
No related merge requests found
......@@ -245,13 +245,16 @@ class SimpleSAML_Auth_State {
* Retrieve an exception state.
*
* @param string|NULL $id The exception id. Can be NULL, in which case it will be retrieved from the request.
* @return array The state array with the exception.
* @return array|NULL The state array with the exception, or NULL if no exception was thrown.
*/
public static function loadExceptionState($id = NULL) {
assert('is_string($id) || is_null($id)');
if ($id === NULL) {
assert('array_key_exists(self::EXCEPTION_PARAM, $_REQUEST)');
if (!array_key_exists(self::EXCEPTION_PARAM, $_REQUEST)) {
/* No exception. */
return NULL;
}
$id = $_REQUEST[self::EXCEPTION_PARAM];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment