Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception in PhabricatorMailSMTPAdapter when sending email
ClosedPublic

Authored by mturdus on Jun 15 2024, 12:40.
Tags
None
Referenced Files
F3675375: D25692.1745509139.diff
Wed, Apr 23, 15:38
F3675331: D25692.1745507549.diff
Wed, Apr 23, 15:12
F3554304: D25692.1744983135.diff
Thu, Apr 17, 13:32
F3530646: D25692.1744873827.diff
Wed, Apr 16, 07:10
F3491425: D25692.1744784218.diff
Tue, Apr 15, 06:16
F3488374: D25692.1744780453.diff
Tue, Apr 15, 05:14
F3387316: D25692.1744434954.diff
Fri, Apr 11, 05:15
F3381062: D25692.1744371775.diff
Thu, Apr 10, 11:42

Details

Summary

strlen() was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts phutil_nonempty_string() as a replacement.

ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/htdocs/phorge/phorge/src/applications/metamta/adapter/PhabricatorMailSMTPAdapter.php:65]

Closes T15857

Test Plan

Send Welcome email via 'Manage' user screen and Run ./bin/phd log afterwards to validate email action

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mturdus requested review of this revision.Jun 15 2024, 12:40
mturdus retitled this revision from Fix PHP 8.1 "strlen(null)" exception in Diviner when sending email via SMTP to Fix PHP 8.1 "strlen(null)" exception in PhabricatorMailSMTPAdapter when sending email.Jun 15 2024, 12:43
This revision is now accepted and ready to land.Jun 15 2024, 13:12