Skip to content

Commit f9960d9

Browse files
authored
Merge pull request SAML-Toolkits#414 from SwenVanZanten/master
Reset the $_SESSION variable if the session isn't started
2 parents cc4d849 + 2fcb2e9 commit f9960d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Saml2/Utils.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,11 @@ public static function isSessionStarted()
966966
*/
967967
public static function deleteLocalSession()
968968
{
969-
session_unset();
970-
971969
if (OneLogin_Saml2_Utils::isSessionStarted()) {
970+
session_unset();
972971
session_destroy();
972+
} else {
973+
$_SESSION = array();
973974
}
974975
}
975976

0 commit comments

Comments
 (0)