Skip to content

Commit

Permalink
[BUGFIX] Skip further processing if no site found
Browse files Browse the repository at this point in the history
If no site is found (e.g. due to missing configuration) skip
the rest of the code.

Fixes: TYPO3-Solr#3407
  • Loading branch information
ochorocho committed Apr 12, 2023
1 parent 6939e2a commit 13f6b22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/IndexQueue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ protected function updateOrAddItemForAllRelatedRootPages(string $itemType, $item

/* @var SiteRepository $siteRepository */
$siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
if ($siteRepository->getSiteByRootPageId($rootPageId) === null) {
continue;
}

$solrConfiguration = $siteRepository->getSiteByRootPageId($rootPageId)->getSolrConfiguration();
$indexingConfiguration = $this->recordService->getIndexingConfigurationName($itemType, $itemUid, $solrConfiguration);
if ($indexingConfiguration === null) {
Expand Down

0 comments on commit 13f6b22

Please sign in to comment.