From 93e55991a020deac79e6f21e0d40dccddf077b89 Mon Sep 17 00:00:00 2001 From: Alan Stanley Date: Fri, 20 Sep 2019 16:56:55 -0300 Subject: [PATCH] method check for remote videos (#162) * method check for remote videos * merged upstream changes * fixed syntax --- src/EventSubscriber/MediaLinkHeaderSubscriber.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }