Closed (fixed)
Project:
HTML Mail
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2022 at 21:36 UTC
Updated:
27 Jan 2024 at 01:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
djdevinComment #3
djdevinUpdated with another similar fix.
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/sites/all/modules/contrib/htmlmail/htmlmail.mail.inc line 284
Comment #4
poker10 commentedPatch #2 looks good, thanks! Probably the second change should be in a separate issue, or this should be retitled, but it also works.
Comment #5
colinstillwell commentedI ran an audit on the whole module and found two additional files which need patching, so have created a new version.
Comment #6
salvisThank you for the patches!
Why does
$_SERVER['SERVER_SOFTWARE']need to be cast to string?Is this already fixed in the D8 version?
Comment #7
poker10 commentedI think that there are cases where the
$_SERVER['SERVER_SOFTWARE']is not defined and the patch is trying to "fix" that by casting to a string. Proper fix should be isset (see for example here, where the similar fix was made in D7 core: #2356055: Notice in includes/mail.inc define). But as I have mentioned in #4, I am not entirely sure that the fix to$_SERVER['SERVER_SOFTWARE']is in scope of this issue.Comment #9
joseph.olstad