Empty search returns error

Created on 8 December 2022, almost 2 years ago
Updated 14 May 2024, 6 months ago

Problem/Motivation

If I do an empty search, I get error "Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in search_api_stats_search_api_results_alter() (line 28 of modules/contrib/search_api_stats/search_api_stats.module)."

This has deprecation info related to https://www.drupal.org/node/3059866 but that should be fixed in it's own ticket. Here the issue is passing null to the mb_strtolower -function which happens if you search for an empty string.

Steps to reproduce

Make a search for an empty string

Proposed resolution

Add check that search string is not empty before passing it to the function.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇮Finland thatguy

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024