You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within the elasticpress plugin for Wordpress, in the file /includes/classes/Feature/Facets/FacetType.php on line 114, there is no check to see if the array key for $block['attrs']['facet'] is set before attempting to set the $acc[] variable record to it. This throws an 'Undefined array key' warning in certain cases.
Describe the bug
Within the elasticpress plugin for Wordpress, in the file /includes/classes/Feature/Facets/FacetType.php on line 114, there is no check to see if the array key for $block['attrs']['facet'] is set before attempting to set the $acc[] variable record to it. This throws an 'Undefined array key' warning in certain cases.
Recommendation to wrap code like so
if( isset( $block['attrs']['facet'] ) ) { $acc[] = $block['attrs']['facet']; }
Steps to Reproduce
Screenshots, screen recording, code snippet
Environment information
No response
WordPress and ElasticPress information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: