fix nullsafe warnings

This commit is contained in:
Jean-Christian Paul 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 public static function frontendWidget(WidgetsElement $w): string
{ {
if (is_null(dcCore::app()->blog) || $w->offline || !$w->checkHomeOnly(dcCore::app()->url->type)) {
return '';
}
$content = $addons = ''; $content = $addons = '';
$s_line = '<li>%s%s</li>'; $s_line = '<li>%s%s</li>';
$s_title = '<strong>%s</strong> '; $s_title = '<strong>%s</strong> ';
if ($w->offline) {
return '';
}
if (!$w->checkHomeOnly(dcCore::app()->url->type)) {
return '';
}
# Entry # Entry
if ($w->entry_show) { if ($w->entry_show) {
$title = $w->entry_title ? $title = $w->entry_title ?