diff --git a/src/EventSubscriber/MediaLinkHeaderSubscriber.php b/src/EventSubscriber/MediaLinkHeaderSubscriber.php index 644db872..5df879f0 100644 --- a/src/EventSubscriber/MediaLinkHeaderSubscriber.php +++ b/src/EventSubscriber/MediaLinkHeaderSubscriber.php @@ -71,7 +71,8 @@ class MediaLinkHeaderSubscriber extends LinkHeaderSubscriber implements EventSub $source_field = $type_configuration['source_field']; if (empty($source_field) || - !$media->hasField($source_field) + !$media->hasField($source_field) || + !method_exists($media->get($source_field), 'referencedEntities') ) { return $links; }