Skip to content

Commit

Permalink
[BUGFIX] Tolerate record without pid (#2087)
Browse files Browse the repository at this point in the history
This fix the bug which leads to an BE error for newly placed content elements with a flud:field.text and enabled rte.
New placed content elements which are not saved doesn't have a pid in the record.

---------

Co-authored-by: Claus Due <[email protected]>
  • Loading branch information
paulAtSlim and NamelessCoder authored Jun 1, 2023
1 parent db40909 commit b6cc61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Form/Field/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected function getPageTsConfigForRichTextEditor(): string
/** @var array|null $record */
$record = $root->getOption('record');
if ($record !== null) {
$pageUid = (integer) $record['pid'];
$pageUid = (integer) ($record['pid'] ?? 0);
}
}

Expand Down

0 comments on commit b6cc61c

Please sign in to comment.