Skip to content

Commit

Permalink
Fixed #15426
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jul 29, 2024
1 parent e26bf70 commit 7a74191
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- Fixed a bug where edit pages didn’t have headings if the element didn’t have a title.
- Fixed a bug where tooltips for truncated element chips in the breadcrumbs were also getting truncated.
- Fixed a bug where it wasn’t possible to sort elements by custom field values in descending order. ([#15434](https://github.com/craftcms/cms/issues/15434))
- Fixed a PHP error that could occur when rendering an element partial template. ([#15426](https://github.com/craftcms/cms/issues/15426))

## 5.2.8 - 2024-07-17

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/ElementHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ public static function renderElements(array $elements, array $variables = []): M
if ($refHandle === null) {
throw new NotSupportedException(sprintf('Element type “%s” doesn’t define a reference handle, so it doesn’t support partial templates.', $element::displayName()));
}
$providerHandle = $element->getFieldLayout()?->provider->getHandle();
$providerHandle = $element->getFieldLayout()?->provider?->getHandle();
if ($providerHandle === null) {
throw new InvalidConfigException(sprintf('Element “%s” doesn’t have a field layout provider that defines a handle, so it can’t be rendered with a partial template.', $element));
}
Expand Down

0 comments on commit 7a74191

Please sign in to comment.