Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22304

initialize variable $contentInfoObjects in PageService::getValidBlockItemsAsContentInfo( Block $block )

    Details

      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;
          }
      

        Activity

        Show
        Bertrand Dunogier added a comment - Fixed by https://github.com/ezsystems/ezpublish-kernel/commit/130146be2f723fbd1eec6ecf41ad847062afa838 .

          People

          • Assignee:
            Unassigned
            Reporter:
            Frank Möller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: