diff --git a/Classes/Eel/Helper.php b/Classes/Eel/Helper.php index a78261c..72d565b 100644 --- a/Classes/Eel/Helper.php +++ b/Classes/Eel/Helper.php @@ -55,7 +55,7 @@ public function vimeoThumbnail($videoID): ?string return null; } $utility = new Utility(); - return $utility->removeProtocolFromUrl($data['thumbnail_url']); + return $utility->removeProtocolFromUrl($data['thumbnail_url'] ?? null); } /** diff --git a/Classes/Service/YoutubeService.php b/Classes/Service/YoutubeService.php index 710435d..13968ad 100644 --- a/Classes/Service/YoutubeService.php +++ b/Classes/Service/YoutubeService.php @@ -128,7 +128,10 @@ public function getAndSaveDataFromApi(NodeInterface $node, bool $remove = false) $image = $data['imageUrl']; $resolution = $data['imageResolution']; } else { - $youtubeImageArray = $this->getBestPossibleYoutubeImage($videoID, $data['thumbnail_url']); + $youtubeImageArray = $this->getBestPossibleYoutubeImage( + $videoID, + $data['thumbnail_url'] ?? null + ); $image = $youtubeImageArray['image']; $resolution = $youtubeImageArray['resolution']; }