Skip to content

Commit b195745

Browse files
committed
IBX-8492: Fixed replacing only field of Content Type with virtual field
1 parent 17e78be commit b195745

File tree

1 file changed

+3
-2
lines changed
  • eZ/Publish/Core/Persistence/Legacy/Content

1 file changed

+3
-2
lines changed

eZ/Publish/Core/Persistence/Legacy/Content/Mapper.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,10 @@ private function buildContentObjects(
313313
$content->versionInfo = $versionInfo;
314314
$content->versionInfo->names = $names;
315315
$content->versionInfo->contentInfo = $contentInfo;
316-
$content->fields = array_values($fields[$contentId][$versionId]);
316+
$content->fields = array_values($fields[$contentId][$versionId] ?? []);
317+
318+
$missingVersionFieldDefinitions = $missingFieldDefinitions[$contentId][$versionId] ?? [];
317319

318-
$missingVersionFieldDefinitions = $missingFieldDefinitions[$contentId][$versionId];
319320
foreach ($missingVersionFieldDefinitions as $languageCode => $versionFieldDefinitions) {
320321
foreach ($versionFieldDefinitions as $fieldDefinition) {
321322
$event = $this->eventDispatcher->dispatch(

0 commit comments

Comments
 (0)