backdrop-contrib / search_api

Provides a generic API for modules offering search capabilities
GNU General Public License v2.0
0 stars 6 forks source link

Undefined array key / TypeError (PHP8.x) #66

Closed laryn closed 9 months ago

laryn commented 9 months ago

Warning: Undefined array key "fields" in SearchApiAbstractProcessor->configurationFormValidate() (line 193 of /app/modules/contrib/search_api/includes/processor.inc).

TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 193 of /app/modules/contrib/search_api/includes/processor.inc).

I ran into this while saving the filters on a Fuzzy Search index, and it's fatal on PHP 8.1. It's probably worth adding some defensive coding there.