Warning: Array to string on SearchApiSubscriber

Created on 22 August 2025, 1 day ago

Problem/Motivation

Warning: Array to string

search query:
keys=elvis%20presley%20-You%27ll%20Never%20Walk%20Alone

produces a warning:

Warning: Array to string conversion in Drupal\google_tag\EventSubscriber\SearchApiSubscriber->onSearch() (line 67 of /app/web/modules/contrib/google_tag/src/EventSubscriber/SearchApiSubscriber.php)

Steps to reproduce

here's a query string:
elvis%20presley%20-You%27ll%20Never%20Walk%20Alone

these query strings are produced by bots/hackers, but they should not product any warnings/errors in the code

Proposed resolution

harden keys processing mechanism

Remaining tasks

harden keys processing mechanism

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇺Australia jannakha Brisbane!

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

Comments & Activities

Production build 0.71.5 2024