Problem/Motivation

PHP8.1 gives warning Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\broken_link\EventSubscriber\BrokenLinkSubscriber->handleBrokenLink() (line 48 of /var/web/vd16344/app/releases/117/web/modules/contrib/broken_link/src/EventSubscriber/BrokenLinkSubscriber.php)

Steps to reproduce

Random error.

Proposed resolution

Passing NULL to trim() or ltrim() or rtrim() is not allowed anymore in PHP 8.1. The code even explicitly checks for NULL (and not just an empty string)

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 broken_link-trim-3295888-2.patch1.2 KBmonymirza
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

monymirza created an issue. See original summary.

monymirza’s picture

Status: Active » Needs review
StatusFileSize
new1.2 KB
atul_ghate’s picture

Assigned: Unassigned » atul_ghate

i will review this patch

atul_ghate’s picture

Assigned: atul_ghate » Unassigned
Status: Needs review » Reviewed & tested by the community

Hi,
Patch is wroking fine ,changing its status to RTBC.

urvashi_vora made their first commit to this issue’s fork.