Skip to content

Commit

Permalink
Filter null collections
Browse files Browse the repository at this point in the history
`Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function getIndexSearch() on null | Error thrown in file /var/www/webroot/releases/15/public/typo3conf/ext/dlf/Classes/Common/Solr/SolrSearch.php in line 745.`
  • Loading branch information
beatrycze-volk committed Feb 4, 2025
1 parent 0d47666 commit 86b9d4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Common/Solr/SolrSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,9 @@ private function getCollectionFilterQuery(string $query) : string
{
$collectionsQueryString = '';
$virtualCollectionsQueryString = '';

array_filter($this->collections, fn($value) => $value !== null);

foreach ($this->collections as $collection) {
// check for virtual collections query string
if ($collection->getIndexSearch()) {
Expand Down

0 comments on commit 86b9d4b

Please sign in to comment.