fix nullsafe warnings
This commit is contained in:
parent
e0256214fd
commit
15ff397ff2
@ -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 ?
|
||||||
|
Loading…
Reference in New Issue
Block a user