fix nullsafe warnings

This commit is contained in:
Jean-Christian Denis 2023-04-22 14:59:05 +02:00
parent e0256214fd
commit 15ff397ff2
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -135,18 +135,14 @@ class Widgets
public static function frontendWidget(WidgetsElement $w): string
{
if (is_null(dcCore::app()->blog) || $w->offline || !$w->checkHomeOnly(dcCore::app()->url->type)) {
return '';
}
$content = $addons = '';
$s_line = '<li>%s%s</li>';
$s_title = '<strong>%s</strong> ';
if ($w->offline) {
return '';
}
if (!$w->checkHomeOnly(dcCore::app()->url->type)) {
return '';
}
# Entry
if ($w->entry_show) {
$title = $w->entry_title ?