fix error on empty record

master
Jean-Christian Paul Denis 2021-10-30 22:09:59 +02:00
parent 7197ffe98c
commit f024b01c85
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 4 additions and 0 deletions

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