Skip to content

Commit

Permalink
Merge pull request avored#183 from hooneun/issue-method_exists
Browse files Browse the repository at this point in the history
'method_exists' function param Object|String, request null
  • Loading branch information
indpurvesh authored Nov 22, 2021
2 parents faa3429 + b7ff783 commit a214558
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 a214558

Please sign in to comment.