Problem/Motivation

I got this error when I updated to php8.1

Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Drupal\ds\Plugin\DsField\Date->build() (line 66 of modules/contrib/ds/src/Plugin/DsField/Date.php).

Steps to reproduce

Upgrade your system PHP version to 8.1

Proposed resolution

create an MR with fixes

CommentFileSizeAuthor
patch-n1.patch527 bytesyazanmajadba

Issue fork ds-3387318

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

YazanMajadba created an issue. See original summary.

yazanmajadba’s picture

Title: Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string » [PHP8.1] Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string
Issue summary: View changes
Status: Active » Needs review
akshay.singh’s picture

Assigned: yazanmajadba » akshay.singh
Issue summary: View changes
akshay.singh’s picture

Status: Needs review » Needs work

akshay.singh’s picture

Assigned: akshay.singh » Unassigned
Status: Needs work » Reviewed & tested by the community

+1 for RTBC

MR created.

Thanks

swentel’s picture

Version: 8.x-4.x-dev » 8.x-3.x-dev

  • swentel committed 47c1a6ea on 8.x-3.x
    Issue #3387318 by YazanMajadba: [PHP8.1] Deprecated function:...
swentel’s picture

Status: Reviewed & tested by the community » Fixed
swentel’s picture

Status: Fixed » Closed (fixed)