Skip to content

Commit

Permalink
Merge pull request #182 from craftcms/bugfix/181-prepNestedEntriesFor…
Browse files Browse the repository at this point in the history
…Display-signature

change signature of _prepNestedEntriesForDisplay
  • Loading branch information
brandonkelly authored Mar 6, 2024
2 parents 849e7d8 + e62e84c commit 727147f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- CKEditor config edit pages now warn when switching the Config Options setting from JavaScript to JSON if the JavaScript code contains any functions. ([#152](https://github.com/craftcms/ckeditor/issues/152), [#180](https://github.com/craftcms/ckeditor/pull/180))
- Fixed a bug where the “Link to an asset” option was showing up when there weren’t any available volumes with URLs. ([#179](https://github.com/craftcms/ckeditor/issues/179))
- Fixed a bug where an error occurred when editing an unsaved element with a CKEditor field. ([#181](https://github.com/craftcms/ckeditor/issues/181))

## 4.0.0-beta.7 - 2024-02-21

Expand Down
6 changes: 3 additions & 3 deletions src/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ protected function prepValueForInput($value, ?ElementInterface $element, bool $s
// (https://github.com/craftcms/ckeditor/issues/96)
$value = $this->_normalizeFigures($value);

$value = $this->_prepNestedEntriesForDisplay($value, $element->siteId, $static);
$value = $this->_prepNestedEntriesForDisplay($value, $element?->siteId, $static);
}

return parent::prepValueForInput($value, $element);
Expand Down Expand Up @@ -1074,11 +1074,11 @@ private function _getEntryTypeOptions(): array
* If it's a static request
*
* @param string $value
* @param int $elementSiteId
* @param int|null $elementSiteId
* @param bool $static
* @return string
*/
private function _prepNestedEntriesForDisplay(string $value, int $elementSiteId, bool $static = false): string
private function _prepNestedEntriesForDisplay(string $value, ?int $elementSiteId, bool $static = false): string
{
[$entryIds, $markers] = $this->findEntries($value, true);

Expand Down

0 comments on commit 727147f

Please sign in to comment.