Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception in PhabricatorAuthAccountView
ClosedPublic

Authored by aklapper on Aug 2 2024, 13:35.
Tags
None
Referenced Files
F3553113: D25761.1744920554.diff
Wed, Apr 16, 20:09
F3498582: D25761.1744792598.diff
Tue, Apr 15, 08:36
F3387530: D25761.1744437531.diff
Fri, Apr 11, 05:58
F3377262: D25761.1744337769.diff
Thu, Apr 10, 02:16
F3372575: D25761.1744250360.diff
Wed, Apr 9, 01:59
F3369720: D25761.1744216136.diff
Tue, Apr 8, 16:28
F3368672: D25761.1744210352.diff
Tue, Apr 8, 14:52
F3368284: D25761.1744207330.diff
Tue, Apr 8, 14:02

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.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/auth/view/PhabricatorAuthAccountView.php:66]

Closes T15900

Test Plan

Try to register an account via LDAP.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable