diff options
author | Jaime Pérez <jaime.perez@uninett.no> | 2016-07-02 18:31:22 +0200 |
---|---|---|
committer | Jaime Pérez <jaime.perez@uninett.no> | 2016-07-02 18:31:22 +0200 |
commit | 5a1edb83b7107473ed7ecb63d68f71a1f893b4af (patch) | |
tree | 8388c901e74c29ec41d67429a502b28f4c224463 /lib/SimpleSAML | |
parent | cd6278cc2bf0704d130aa2fe66e8b6dc1d007375 (diff) | |
download | simplesamlphp-5a1edb83b7107473ed7ecb63d68f71a1f893b4af.zip simplesamlphp-5a1edb83b7107473ed7ecb63d68f71a1f893b4af.tar.gz simplesamlphp-5a1edb83b7107473ed7ecb63d68f71a1f893b4af.tar.bz2 |
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.
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Session.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index 241b705..2690be7 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -194,7 +194,7 @@ class SimpleSAML_Session } // check if we have stored a session stored with the session handler - $prev = (self::$instance !== null); + $session = null; try { $session = self::getSession(); @@ -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 * instead. */ - if (self::$instance !== null && !$prev) { + if (self::$instance !== null) { return self::$instance; } |