diff --git a/application/src/View/Helper/LightGalleryOutput.php b/application/src/View/Helper/LightGalleryOutput.php index b711e8837..4443d1cdc 100644 --- a/application/src/View/Helper/LightGalleryOutput.php +++ b/application/src/View/Helper/LightGalleryOutput.php @@ -34,7 +34,7 @@ public function __invoke($files = null) ]; $mediaCaptionAttribute = ($mediaCaption) ? $mediaCaptionOptions[$mediaCaption] : ''; $mediaType = $media->mediatype(); - if (strpos($mediaType, 'video') !== false) { + if (null !== $mediaType && strpos($mediaType, 'video') !== false) { $videoSrcObject = [ 'source' => [ [ diff --git a/application/src/View/Helper/SortMedia.php b/application/src/View/Helper/SortMedia.php index 3a44d15fc..d62b0b3b3 100644 --- a/application/src/View/Helper/SortMedia.php +++ b/application/src/View/Helper/SortMedia.php @@ -18,7 +18,7 @@ public function __invoke($files = null) $mediaRenderer = $media->renderer(); if (in_array($mediaType, $whitelist) || (strpos($mediaRenderer, 'youtube') !== false)) { $sortedMedia['lightMedia'][$mediaCount]['media'] = $media; - if (strpos($mediaType, 'video') !== false) { + if (null !== $mediaType && strpos($mediaType, 'video') !== false) { $html5videos[$mediaCount] = pathinfo($media->source(), PATHINFO_FILENAME); $sortedMedia['lightMedia'][$mediaCount]['tracks'] = []; }