Skip to content

Commit

Permalink
FIX Ensure int is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 23, 2024
1 parent bcf8320 commit 3c9d9af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Security/LogOutAuthenticationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function logOut(HTTPRequest $request = null)
$loginHandler = Injector::inst()->get(LogInAuthenticationHandler::class);
$member = Security::getCurrentUser();

$loginSessionID = $request->getSession()->get($loginHandler->getSessionVariable());
$loginSessionID = $request->getSession()->get($loginHandler->getSessionVariable()) ?: 0;
$loginSession = LoginSession::get()->byID($loginSessionID);
if ($loginSession && $loginSession->canDelete($member)) {
$loginSession->delete();
Expand Down

0 comments on commit 3c9d9af

Please sign in to comment.