Skip to content

Commit

Permalink
Fixed PHP error
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 6, 2024
1 parent 8de9df6 commit c0fe9a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fixed a bug where unedited, unpublished drafts created within Matrix fields would appear on page reload.
- Fixed a bug where nested drafts weren’t getting deleted if no longer needed by a Matrix or Addresses field.
- Fixed a bug where Matrix fields in inline-editable blocks view weren’t deleting the last entry. ([14303](https://github.com/craftcms/cms/issues/14303))
- Fixed a PHP error that could occur when field layouts contained UI elements.

## 5.0.0-alpha.12 - 2024-02-05

Expand Down
3 changes: 1 addition & 2 deletions src/models/FieldLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,8 @@ public function createForm(?ElementInterface $element = null, bool $static = fal
// if we already have an error-key for this field, prefix it
if (isset($tagAttributes['data']['error-key'])) {
$errorKey = $form->errorKeyPrefix . '.' . $tagAttributes['data']['error-key'];
} else {
} elseif ($layoutElement instanceof BaseField) {
// otherwise let's construct it
/** @phpstan-ignore-next-line */
$errorKey = $form->errorKeyPrefix . '.' . ($layoutElement->name ?? $layoutElement->attribute());
}
}
Expand Down

0 comments on commit c0fe9a6

Please sign in to comment.