diff --git a/Rest/Field/Value.php b/Rest/Field/Value.php index 22b97f7..d702e19 100644 --- a/Rest/Field/Value.php +++ b/Rest/Field/Value.php @@ -101,7 +101,9 @@ private function getImageFieldIdentifier($contentId, $language, $related = false } elseif (in_array('ezobjectrelation', $fieldDefinitions) && !$related) { $field = $content->getFieldValue($fieldNames['ezobjectrelation'], $language); - return $this->getImageFieldIdentifier($field->destinationContentId, $language, true); + if (!empty($field->destinationContentId)) { + return $this->getImageFieldIdentifier($field->destinationContentId, $language, true); + } } else { return $this->getConfiguredFieldIdentifier('image', $contentType); }