diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 5471fbc..7fbae5b 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -584,7 +584,12 @@ public function getFieldValue($field_name, $property, $delta = 0) { } // Fall back to access the property through the field object. - return $this->get($field_name)->$property; + $field_value = $this->get($field_name)->get($delta); + if ($field_value !== NULL) { + return $field_value->$property + } + // $delta does not exist in value list. + return NULL; } /**