- Issue created by @capysara
- Merge request !16#3487310: added check for facet_data before attempting reset(). β (Open) created by capysara
I just updated the facets module from beta1 to beta3 because I was getting this error:
Input value "page" contains a non-scalar value. in Symfony\Component\HttpFoundation\InputBag->get() (line 38 of /var/www/html/vendor/symfony/http-foundation/InputBag.php).
But now I'm seeing this error in my logs if I perform a search with no results:
TypeError: reset(): Argument #1 ($array) must be of type array, false given in reset() (line 83 of /var/www/html/docroot/modules/contrib/jsonapi_search_api/modules/jsonapi_search_api_facets/src/EventSubscriber/AddSearchMetaEventSubscriber.php).
I'm not sure if there should be a check earlier in the process to prevent it from getting this far, but checking for $facet_data before attempting to reset it prevents the php error.
Active
1.0
Code