Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.2
Description
An exception occurs while rendering of empty blocks. The variable $contentInfoObjects should be initialized before the foreach loop. Otherwise the variable will be uninitialized.
public function getValidBlockItemsAsContentInfo( Block $block ) { $contentService = $this->repository->getContentService(); $contentInfoObjects = array(); foreach ( $this->getValidBlockItems( $block ) as $item ) { $contentInfoObjects[] = $contentService->loadContentInfo( $item->contentId ); } return $contentInfoObjects; }