Warning message:

Warning: Invalid argument supplied for foreach() in elasticsearch_connector_autocomp_form_search_api_index_fields_alter() (line 192

CommentFileSizeAuthor
#2 3118722-2-avoid-php-warning.patch865 byteslyalyuk

Comments

lyalyuk created an issue. See original summary.

lyalyuk’s picture

StatusFileSize
new865 bytes

here is a simple patch

lyalyuk’s picture

Assigned: lyalyuk » Unassigned
Status: Active » Needs review
thursday_bw’s picture

Status: Needs review » Postponed (maintainer needs more info)

Could you please provide some more information on how to replicate this.

I've added an index and then saved the fields form and I see this warning:

Warning: Invalid argument supplied for foreach() in Drupal\search_api\Form\IndexFieldsForm->validateForm() (line 420 of /app/web/modules/contrib/search_api/src/Form/IndexFieldsForm.php)

But not from the module hook.

If you could add to the existing tests in dev with steps to reproduce that would be great.. but just well documented steps would help.