fix error on empty record
parent
7197ffe98c
commit
f024b01c85
|
@ -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 New Issue