Commit 75f40c0b authored by Markus Kalkbrenner's avatar Markus Kalkbrenner Committed by Markus Kalkbrenner
Browse files

Issue #3268823 by mkalkbrenner: processFacets(NULL) leads to wrong results if...

Issue #3268823 by mkalkbrenner: processFacets(NULL) leads to wrong results if multiple facet sources exist
parent 6224cce6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ class DefaultFacetManager {
   * Initializes facet builds, sets the breadcrumb trail.
   *
   * Facets are built via FacetsFacetProcessor objects. Facets only need to be
   * processed, or built, once The FacetsFacetManager::processed semaphore is
   * processed, or built, once the FacetsFacetManager::processed semaphore is
   * set when this method is called ensuring that facets are built only once
   * regardless of how many times this method is called.
   *
@@ -177,7 +177,7 @@ class DefaultFacetManager {
    }

    $unprocessedFacets = array_filter($this->facets, function ($item) use ($facetsource_id) {
      return !isset($this->processedFacets[$facetsource_id][$item->id()]);
      return $item->getFacetSourceId() === $facetsource_id && !isset($this->processedFacets[$facetsource_id][$item->id()]);
    });

    // All facets were already processed on a previous run, so no need to do so