Skip to content

Commit

Permalink
Merge pull request #928 from creative-commoners/pulls/8.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 0b5e35a + 5bb6e6f commit 1339a9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Extension/Traits/FluentObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ protected function updateFluentCMSFields(FieldList $fields)

// Augment Localisation tab with clickable locale links to allow easy navigation between model localisations
if ($owner->hasExtension(CMSEditLinkExtension::class)) {
$controller = Controller::has_curr() ? Controller::curr() : null;
$request = $controller?->getRequest();
$request = Controller::curr()?->getRequest();

// Pass getVars separately so we can process them later
$params = $request?->getVars() ?? [];
Expand Down

0 comments on commit 1339a9d

Please sign in to comment.