diff --git a/protected/humhub/modules/stream/actions/Stream.php b/protected/humhub/modules/stream/actions/Stream.php index 441db46fec..cdb9a9266c 100644 --- a/protected/humhub/modules/stream/actions/Stream.php +++ b/protected/humhub/modules/stream/actions/Stream.php @@ -295,17 +295,26 @@ abstract class Stream extends Action */ public static function renderEntry(ContentActiveRecord $record, $options = [], $partial = true) { + // TODO should be removed in next major version // Compatibility with pre 1.2.2 if(is_bool($options)) { $partial = $options; $options = []; } + $jsWidget = null; + if(isset($options['jsWidget'])) { $jsWidget = $options['jsWidget']; unset($options['jsWidget']); } else { - $jsWidget = $record->getWallEntryWidget()->jsWidget; + if ($record->getWallEntryWidget() !== null) { + $jsWidget = $record->getWallEntryWidget()->jsWidget; + } + } + + if ($jsWidget===null) { + return ''; } if ($partial) {