Skip to content

Commit

Permalink
[BUGFIX] Guard against undefined doktype
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Nov 11, 2024
1 parent e876067 commit ecc46b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Service/PageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ public function shouldUseShortcutUid(array $arguments): bool
*/
public function getShortcutTargetPage(array $page): ?array
{
if ((integer) $page['doktype'] !== PageRepository::DOKTYPE_SHORTCUT) {
$dokType = (integer) ($page['doktype'] ?? PageRepository::DOKTYPE_DEFAULT);
if ($dokType !== PageRepository::DOKTYPE_SHORTCUT) {
return null;
}
$originalPageUid = $page['uid'];
Expand Down

0 comments on commit ecc46b5

Please sign in to comment.