diff --git a/src/Plugin/search_api/processor/EDTFYear.php b/src/Plugin/search_api/processor/EDTFYear.php index 55d0efe..1e929ec 100644 --- a/src/Plugin/search_api/processor/EDTFYear.php +++ b/src/Plugin/search_api/processor/EDTFYear.php @@ -251,7 +251,7 @@ private function getDateFromParagraphField(EntityInterface $entity, string $bund $paragraph_entity = $entity->get($paragraph_field_name) ->referencedEntities()[0] ?? NULL; - if ($paragraph_entity->hasField($field_name) + if ($paragraph_entity && $paragraph_entity->hasField($field_name) && !$paragraph_entity->get($field_name)->isEmpty()) { return trim($paragraph_entity->get($field_name)->value); }