Skip to content

Commit

Permalink
Merge pull request #274 from creative-commoners/pulls/4.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 6cccd25 + 19458e7 commit 723e3de
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ protected function updateGrant(bool &$grant, ?File $record = null, ?array $args
if ($grant) {
return;
}
if (!Controller::has_curr()) {
$controller = Controller::curr();
if (!$controller) {
return;
}

$session = Controller::curr()->getRequest()->getSession();
$session = $controller->getRequest()->getSession();

if (!$session) {
return;
Expand Down

0 comments on commit 723e3de

Please sign in to comment.