Skip to content

Commit

Permalink
[BUGFIX] Delete documents for valid connections only
Browse files Browse the repository at this point in the history
This prevents the Exception `Call to a member function getWriteService() on null` when solr is disabled (solr_enabled_read: false)
  • Loading branch information
christophlehmann authored and dkd-kaehm committed May 27, 2021
1 parent bff768c commit b99d7ad
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -122,7 +122,7 @@ protected function deleteIndexDocuments($table, $uid, $language = 0)
$siteHash = $site->getSiteHash();
// a site can have multiple connections (cores / languages)
$solrConnections = $this->connectionManager->getConnectionsBySite($site);
if ($language > 0) {
if ($language > 0 && isset($solrConnections[$language])) {
$solrConnections = [$language => $solrConnections[$language]];
}
$this->deleteRecordInAllSolrConnections($table, $uid, $solrConnections, $siteHash, $enableCommitsSetting);
Expand Down

0 comments on commit b99d7ad

Please sign in to comment.