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

Created on 17 March 2023, almost 2 years ago
Updated 10 November 2023, about 1 year 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 1 day 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.71.5 2024