Skip to content

Commit

Permalink
'method_exists' function param Object|String, request null
Browse files Browse the repository at this point in the history
  • Loading branch information
hooneun committed Nov 22, 2021
1 parent faa3429 commit b7ff783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Models/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getContent()
$pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->contentTags[0], $this->contentTags[1]);
$callback = function ($matches) {
$whitespace = empty($matches[3]) ? '' : $matches[3] . $matches[3];
$widget = Widget::get($matches[2]);
$widget = Widget::get($matches[2]) ?? '';

if (method_exists($widget, 'render')) {
$widgetContent = $widget->render();
Expand Down

0 comments on commit b7ff783

Please sign in to comment.