Commit 226e6d4d authored by Thomasdbcklr's avatar Thomasdbcklr Committed by borisson_

Issue #3000495 by nikunj.addweb, Kunal.Udani, Thomasdbcklr: Update to Facets...

Issue #3000495 by nikunj.addweb, Kunal.Udani, Thomasdbcklr: Update to Facets 8.x-1.1: Error: Call to a member function getResultCount()
parent 990a51d1
......@@ -405,7 +405,12 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo
*/
public function getCount() {
$search_id = $this->getDisplay()->getPluginId();
return $this->searchApiQueryHelper->getResults($search_id)->getResultCount();
if ($search_id && !empty($search_id)) {
if ($this->searchApiQueryHelper->getResults($search_id) !== NULL) {
return $this->searchApiQueryHelper->getResults($search_id)
->getResultCount();
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment