Skip to content

Commit

Permalink
[BUGFIX] Add type cast to TaskProviders
Browse files Browse the repository at this point in the history
Fix exception which happens with PHP8 because the returned page id is actually a string but an integer is required
  • Loading branch information
georgringer authored and dkd-kaehm committed Apr 7, 2022
1 parent cb0292d commit ab07048
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Task/OptimizeIndexTaskAdditionalFieldProvider.php
Expand Up @@ -118,7 +118,7 @@ protected function initialize(
$currentAction = $schedulerModule->getCurrentAction();

if ($currentAction->equals(Action::EDIT)) {
$this->site = $this->siteRepository->getSiteByRootPageId($task->getRootPageId());
$this->site = $this->siteRepository->getSiteByRootPageId((int)$task->getRootPageId());
}
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Task/ReIndexTaskAdditionalFieldProvider.php
Expand Up @@ -106,7 +106,7 @@ protected function initialize(
$currentAction = $schedulerModule->getCurrentAction();

if ($currentAction->equals(Action::EDIT)) {
$this->site = $this->siteRepository->getSiteByRootPageId($task->getRootPageId());
$this->site = $this->siteRepository->getSiteByRootPageId((int)$task->getRootPageId());
}
}

Expand Down

0 comments on commit ab07048

Please sign in to comment.