Skip to content

Commit

Permalink
Fix strpos deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsafley committed Jun 13, 2024
1 parent be739a4 commit e0a284a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/src/View/Helper/LightGalleryOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
[
Expand Down
2 changes: 1 addition & 1 deletion application/src/View/Helper/SortMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = [];
}
Expand Down

0 comments on commit e0a284a

Please sign in to comment.