strpos() Passing null to parameter #1 ($string) of type string is deprecated with PHP8.1 - phpMail plugin

Running a phpunit with mailing feature will throws this error under risky tests.

CommentFileSizeAuthor
Screenshot 2022-08-04 at 4.10.36 PM.png211.45 KBankitv18

Issue fork drupal-3301770

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ankitv18 created an issue. See original summary.

ankitv18’s picture

Assigned: ankitv18 » Unassigned
Status: Active » Needs review
Lendude’s picture

We have this too when using the PHP internal webserver on our CI.

Not sure if just casting it to a string is the best way to handle this, shouldn't we just check if it is set before using it?

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

deepakkm’s picture

Status: Needs review » Reviewed & tested by the community
deepakkm’s picture

Status: Reviewed & tested by the community » Fixed

This patch is added in 10.0.0-rc2 version

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

idebr’s picture