Skip to content

Commit

Permalink
fix(Modules/Widgets): ensure "getContent" function returns string as …
Browse files Browse the repository at this point in the history
…specified instead of null when no content is found
  • Loading branch information
Patrick Mulligan committed Apr 2, 2024
1 parent f4b4893 commit 4e45c33
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Modules/Widgets/Entities/WidgetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ protected function getContent(BaseWidget $widget): string

return $output ? $output : '';
}

return is_object($content) ? $content->__toString() : $content;
return is_object($content) ? $content->__toString() : $content ?? '';
}

/**
Expand Down

0 comments on commit 4e45c33

Please sign in to comment.