Skip to content

Commit

Permalink
Merge pull request #606 from Davilarek/davilarek-patch-1
Browse files Browse the repository at this point in the history
Check if session is active before destroying it
  • Loading branch information
leepeuker authored Jul 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 4facfb9 + b4f3182 commit 9d4875b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Util/SessionWrapper.php
Original file line number Diff line number Diff line change
@@ -29,8 +29,10 @@ public function destroy() : void
);
}

session_destroy();
session_regenerate_id();
if (session_status() === PHP_SESSION_ACTIVE) {
session_destroy();
session_regenerate_id();
}
}

public function find(string $key) : mixed

0 comments on commit 9d4875b

Please sign in to comment.