fix error on empty record
This commit is contained in:
parent
7197ffe98c
commit
f024b01c85
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ class postWidgetTextWidget
|
||||||
$pwt = new postWidgetText($core);
|
$pwt = new postWidgetText($core);
|
||||||
$rs = $pwt->getWidgets(['post_id' => $_ctx->posts->post_id]);
|
$rs = $pwt->getWidgets(['post_id' => $_ctx->posts->post_id]);
|
||||||
|
|
||||||
|
if ($rs->isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if ('' != $rs->option_title) {
|
if ('' != $rs->option_title) {
|
||||||
$title = $rs->option_title;
|
$title = $rs->option_title;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue