fix error on empty record

This commit is contained in:
Jean-Christian Denis 2021-10-30 22:09:59 +02:00
parent 7197ffe98c
commit f024b01c85
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -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;
}