SearchApiSolrHighlightedFormatterSettingsTrait Warning: foreach() argument must be of type array|object, string given ... line 109

Created on 11 July 2025, about 2 months ago

Warning: foreach() argument must be of type array|object, string given in Drupal\search_api_solr\Plugin\Field\FieldFormatter\SearchApiSolrHighlightedTextDefaultFormatter->getHighlightedValue() (line 109 of modules/contrib/search_api_solr/src/Plugin/Field/FieldFormatter/SearchApiSolrHighlightedFormatterSettingsTrait.php).

When looking at the query_keys call right before the getKeys() method can return array|string|null. So in the case of a string we get this error.

πŸ› Bug report
Status

Active

Version

4.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brayn7 Lexington, Ky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024