Page MenuHomePhorge

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

Authored by mturdus on Jun 15 2024, 12:40.

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