From 3dd0260053568453334c29a5127b6e557fcdb367 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 20 Apr 2023 20:46:58 +0200 Subject: [PATCH] cosmetic nullsafe fix --- src/Widgets.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Widgets.php b/src/Widgets.php index 9a4a03d..a7d8d5e 100644 --- a/src/Widgets.php +++ b/src/Widgets.php @@ -46,6 +46,11 @@ class Widgets return ''; } + // nullsafe PHP < 8.0 + if (is_null(dcCore::app()->blog)) { + return ''; + } + $ftdatecrea = $w->ftdatecrea; //Si la date est vide nous recherchons la date en base if (strlen(rtrim($ftdatecrea)) == 0) {