strpos(): Passing null to parameter in PhpMail

Created on 10 October 2022, over 2 years ago
Updated 5 July 2023, over 1 year ago

Pro3314489blem/Motivation

At time to test I got:

Behat\Testwork\Call\Exception\CallErrorException: 8192: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/web/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php

in PhpMail.php 80 and 112 lines can be the reasons.

Steps to reproduce

- First send some email on your Drupal project
- Review the messages log and found this as error.

Proposed resolution

Valid the values befor to call to strpos function

🐛 Bug report
Status

Closed: duplicate

Version

9.5

Component
Mail 

Last updated 19 days ago

No maintainer
Created by

🇧🇴Bolivia vacho Cochabamba

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024