Skip to content

Commit

Permalink
ENH Stop using Controller::has_curr()
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 13, 2025
1 parent 9e56e58 commit 3a23d00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/RealMeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,9 @@ public function enforceLogin(HTTPRequest $request, $backUrl = null)

// If not, attempt to retrieve authentication data from OneLogin (in case this is called during SAML assertion)
try {
if (!$session->get("RealMeErrorBackURL") && Controller::has_curr()) {
$session->set("RealMeErrorBackURL", Controller::curr()->Link("Login"));
$controller = Controller::curr();
if (!$session->get("RealMeErrorBackURL") && $controller) {
$session->set("RealMeErrorBackURL", $controller->Link("Login"));
}

$auth = $this->getAuth();
Expand Down

0 comments on commit 3a23d00

Please sign in to comment.