cosmetic nullsafe fix

This commit is contained in:
Jean-Christian Paul Denis 2023-04-20 20:46:58 +02:00
parent 6acb50ed54
commit 3dd0260053
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -46,6 +46,11 @@ class Widgets
return ''; return '';
} }
// nullsafe PHP < 8.0
if (is_null(dcCore::app()->blog)) {
return '';
}
$ftdatecrea = $w->ftdatecrea; $ftdatecrea = $w->ftdatecrea;
//Si la date est vide nous recherchons la date en base //Si la date est vide nous recherchons la date en base
if (strlen(rtrim($ftdatecrea)) == 0) { if (strlen(rtrim($ftdatecrea)) == 0) {