1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Fallback to standard link if a news entries doesn't have a 'newsImage'

This commit is contained in:
Derick Rethans
2026-01-21 15:10:09 +00:00
parent 7e2d16d545
commit cfe41a81dd

View File

@@ -33,7 +33,7 @@ foreach ((new NewsHandler())->getConferences() as $entry) {
$content .= '</div>';
$content .= '</div>';
$panels .= sprintf('<p class="panel"><a href="%s">%s</a></p>', $entry["newsImage"]["link"], $entry["title"]);
$panels .= sprintf('<p class="panel"><a href="%s">%s</a></p>', $entry["newsImage"]["link"] ?? $link, $entry["title"]);
}
$content .= "</div>";