TypeError: str_replace(): Argument #3 ($subject) must be of type array|string

Created on 15 November 2023, about 1 year ago
Updated 4 September 2024, 3 months ago

Problem/Motivation

TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, Drupal\Core\StringTranslation\TranslatableMarkup given in str_replace() (line 258 of /code/web/modules/contrib/views_filters_summary/src/Plugin/views/area/ViewsFiltersSummary.php).

Steps to reproduce

use PHP 8.1 strict mode

Proposed resolution

Cast the TranslatableMarkup object to sting before using str_replace. This needs to be improved but it works.

๐Ÿ› Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡ทArgentina nexonOSX

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