Skip to content
Snippets Groups Projects
Commit 5a1edb83 authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Remove superfluous code.

If we just called isset() on SimpleSAML_Session::$instance, and it returned false as we continued execution, it makes no sense to get the "previous" instance since it will always be null. We can just check that $instance is not null later.
parent cd6278cc
No related branches found
No related tags found
No related merge requests found
...@@ -194,7 +194,7 @@ class SimpleSAML_Session ...@@ -194,7 +194,7 @@ class SimpleSAML_Session
} }
// check if we have stored a session stored with the session handler // check if we have stored a session stored with the session handler
$prev = (self::$instance !== null); $session = null;
try { try {
$session = self::getSession(); $session = self::getSession();
...@@ -223,7 +223,7 @@ class SimpleSAML_Session ...@@ -223,7 +223,7 @@ class SimpleSAML_Session
* error message). This means we don't need to create a new session again, we can use the one that's loaded now * error message). This means we don't need to create a new session again, we can use the one that's loaded now
* instead. * instead.
*/ */
if (self::$instance !== null && !$prev) { if (self::$instance !== null) {
return self::$instance; return self::$instance;
} }
......
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