Missing search keys results in error

Created on 12 June 2023, over 1 year ago
Updated 17 July 2023, over 1 year ago

Problem/Motivation

When a user searches without any search keys, an error is displayed:

Deprecated function: str_ireplace(): Passing null to parameter #1 ($search) of type array|string is deprecated in Drupal\google_json_api\TwigExtension\HighlightSearchTerm::highlightSearch() (line 49 of modules/contrib/google_json_api/src/TwigExtension/HighlightSearchTerm.php).

Proposed resolution

Check for a null value and don't run str_ireplace()

πŸ› Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States SamLerner

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

Comments & Activities

Production build 0.71.5 2024