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.