From f024b01c85d0decfb744b622998b3403b2e50846 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 30 Oct 2021 22:09:59 +0200 Subject: [PATCH] fix error on empty record --- _widgets.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_widgets.php b/_widgets.php index bf1c493..99028c2 100644 --- a/_widgets.php +++ b/_widgets.php @@ -75,6 +75,10 @@ class postWidgetTextWidget $pwt = new postWidgetText($core); $rs = $pwt->getWidgets(['post_id' => $_ctx->posts->post_id]); + if ($rs->isEmpty()) { + return null; + } + if ('' != $rs->option_title) { $title = $rs->option_title; }