Skip to content

Commit

Permalink
Fixed #15707
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 11, 2024
1 parent 853450d commit 202c48a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Updated Twig to 3.14. ([#15704](https://github.com/craftcms/cms/issues/15704))
- Fixed a bug where address’ Label fields were being marked as translatable. ([#15702](https://github.com/craftcms/cms/pull/15702))
- Fixed an error that could occur when saving an entry with a Matrix field, if the nested entries didn’t have slugs.
- Fixed a bug where relation fields weren’t merging uploaded asset IDs with the existing field values. ([#15707](https://github.com/craftcms/cms/issues/15707))
- Fixed an RCE vulnerability.

## 5.4.2 - 2024-09-06
Expand Down
5 changes: 5 additions & 0 deletions src/fields/BaseRelationField.php
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,11 @@ public function getRelationTargetIds(ElementInterface $element): array
ArrayHelper::isNumeric($value->id)
) {
$targetIds = $value->id ?: [];
} elseif (
isset($value->where['elements.id']) &&
ArrayHelper::isNumeric($value->where['elements.id'])
) {
$targetIds = $value->where['elements.id'] ?: [];
} else {
// just running $this->_all()->ids() will cause the query to get adjusted
// see https://github.com/craftcms/cms/issues/14674 for details
Expand Down

0 comments on commit 202c48a

Please sign in to comment.