Skip to content

Commit

Permalink
Fix enclosure type when null
Browse files Browse the repository at this point in the history
  • Loading branch information
Simounet committed Jul 16, 2023
1 parent 409a1ea commit 2ae9da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Feed.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected function getEnclosureHtml($enclosure) {
: substr($enclosureName, strrpos($enclosureName,'.')+1);

$html ='<div class="enclosure"><h1>Fichier média :</h1>';
$enclosureType = $enclosure->get_type();
$enclosureType = $enclosure->get_type() ?? '';
if (strpos($enclosureType, 'image/') === 0) {
$html .= '<img src="' . $enclosure->link . '" />';
} elseif (strpos($enclosureType, 'audio/') === 0 || strpos($enclosureType, 'application/ogg') === 0) {
Expand Down

0 comments on commit 2ae9da0

Please sign in to comment.