PHP 8.1 Deprecated function: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in apachesolr_autocomplete_suggest_word_completion()

Created on 28 July 2023, over 1 year ago

Problem/Motivation

Deprecated function: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in apachesolr_autocomplete_suggest_word_completion() (line 250 of /apachesolr_autocomplete/apachesolr_autocomplete.module).

Steps to reproduce

1. Search for ' *' used autocomplete.
2. Go to dblog
3. Locate deprecated function

Proposed resolution

so I used Elvis operator ( ?: ) to bypass null value

πŸ› Bug report
Status

Needs review

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Igumnov_aleksey

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024