Skip to content

Commit

Permalink
Merge pull request #176 from creative-commoners/pulls/6.0/ctrl-curr
Browse files Browse the repository at this point in the history
ENH Stop using Controller::has_curr()
  • Loading branch information
GuySartorelli authored Feb 16, 2025
2 parents 9e56e58 + 3a23d00 commit e796939
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 e796939

Please sign in to comment.