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

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

    XMLWordPrintable

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            shor.tcut shor.tcut
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: