Skip to content

Commit

Permalink
fix: prevent empty page record
Browse files Browse the repository at this point in the history
  • Loading branch information
jackd248 committed Nov 8, 2024
1 parent 706c310 commit d054df6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/EventListener/ModifyButtonBarEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public function __invoke(ModifyButtonBarEvent $event): void
if ($table === 'pages') {
$uid = (int)($request->getParsedBody()['id'] ?? $request->getQueryParams()['id'] ?? (isset($request->getQueryParams()['edit']['pages']) ? array_keys($request->getQueryParams()['edit']['pages'])[0] : 0));
$page = ContentUtility::getPage($uid);
if (!$page) {
return;
}
$status = $page['tx_ximatypo3contentplanner_status'] ? ContentUtility::getStatus($page['tx_ximatypo3contentplanner_status']) : null;
} else {
$uid = (int)array_key_first($request->getQueryParams()['edit'][$table]);
Expand Down

0 comments on commit d054df6

Please sign in to comment.