Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception in PhabricatorAuthStartController.php
ClosedPublic

Authored by aklapper on May 15 2024, 12:33.
Tags
None
Referenced Files
F2945019: D25639.1738280939.diff
Wed, Jan 29, 23:48
F2943011: D25639.1738155047.diff
Tue, Jan 28, 12:50
F2936749: D25639.1737938239.diff
Sun, Jan 26, 00:37
F2936654: D25639.1737934143.diff
Sat, Jan 25, 23:29
F2936202: D25639.1737908925.diff
Sat, Jan 25, 16:28
F2935032: D25639.1737814855.diff
Fri, Jan 24, 14:20
F2933530: D25639.1737773860.diff
Fri, Jan 24, 02:57
F2933529: D25639.1737773858.diff
Fri, Jan 24, 02:57

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/controller/PhabricatorAuthStartController.php:34]

Closes T15832

Test Plan

Run arc unit locally, probably also don't be logged in.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable