system.mail.inc: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

Created on 17 March 2023, over 1 year ago
Updated 10 November 2023, 8 months ago

When running on CLI (for example with Drush), $_SERVER['SERVER_SOFTWARE'] is not set.

When, for example, a standard system mail is sent during the command execution, the mail() function in system.mail.inc produces the following deprecation warning:

strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated system.mail.inc:72

This is comparable to this issue . The attached patch works in a similar way to get rid of the warning.

🐛 Bug report
Status

Fixed

Version

7.0 ⚰️

Component
Mail 

Last updated 2 days ago

No maintainer
Created by

🇩🇪Germany Chase.

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024