TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given

Created on 14 March 2025, 23 days ago

Problem/Motivation

Am getting an ajax error that seems to be connected with this module - the following error in the logs indicates maybe it is when the fulltext search field is empty it is trying to run a function on null

I have only noticed this since latest update.

TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /.../views_filters_summary/modules/views_filters_summary_search_api/views_filters_summary_search_api.module on line 32 in Drupal\Component\Utility\Html::escape() (line 431 of /.../core/lib/Drupal/Component/Utility/Html.php).

Steps to reproduce

Have a search api index view with exposed filters using better exposed filters with search facets and fulltext filter
Have a views_filters_summary block in header of the view
Have ajax turned on

Proposed resolution

Only run the html escape if there is a value

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom gsquirrel London

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024