Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/elements/NestedElementManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ private function saveNestedElements(ElementInterface $owner): void
$this->propagationMethod !== PropagationMethod::All &&
($owner->propagateAll || !empty($owner->newSiteIds))
) ||
($owner->propagateRequired && $this->field->layoutElement->required)
($owner->propagateRequired && $this->field?->layoutElement->required)
) {
// Find the owner's site IDs that *aren't* supported by this site's nested elements
$ownerSiteIds = array_map(
Expand Down Expand Up @@ -925,7 +925,7 @@ private function saveNestedElements(ElementInterface $owner): void
// its elements have been replaced by the other sites’ nested elements
if ($owner->propagateAll) {
$this->duplicateNestedElements($owner, $localizedOwner, force: true);
} elseif ($owner->propagateRequired && $this->field->layoutElement->required) {
} elseif ($owner->propagateRequired && $this->field?->layoutElement->required) {
// if we're propagating required and the field is required, and it doesn't validate because of this field,
// duplicate like above
$localizedOwner->setScenario(Element::SCENARIO_LIVE);
Expand Down
Loading