request may not have a session

see https://github.com/silverstripe/silverstripe-framework/pull/10512
This commit is contained in:
Thomas Portelange 2022-09-28 10:44:13 +02:00 committed by GitHub
parent b80309093c
commit 54892fa267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ class MemberAuthenticator implements Authenticator
// Optionally record every login attempt as a {@link LoginAttempt} object
$this->recordLoginAttempt($data, $request, $member, $result->isValid());
if ($member) {
if ($member && $request->hasSession()) {
$request->getSession()->clear('BackURL');
}