Deprecation with PHP 8:
realpath(): Passing null to parameter #1 ($path) of type string is deprecated in /var/www/html/sites/all/modules/contrib/htmlmail/htmlmail.tpl.php line 110
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | htmlmail-realpath-passing-null-3281253-5.patch | 2.17 KB | colinstillwell |
| #3 | 3281253.patch | 1.12 KB | djdevin |
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