Homestyx hydra
Diffusion hydra b56d86e48d0f

Fix numerous PHP 8.1 "strlen(null)" exceptions preventing homepage to display

Description

Fix numerous PHP 8.1 "strlen(null)" exceptions preventing homepage to display

Summary:
Fix numerous PHP 8.1 RuntimeExceptions caused by the deprecation of strlen(null).

The strlen() was used in Phabricator to check if a generic value was a non-empty string.
For this reason, Phorge adopts phutil_nonempty_string() that checks that.

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

Closes T15264

Test Plan: Phorge homepage is displayed on PHP 8.1 after applying these changes

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15264

Differential Revision: https://we.phorge.it/D25132

Details

Provenance
Andre KlapperAuthored on Apr 27 2023, 8:07 AM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:f3b37413167e: Fix PHP 8.1 "strlen(null)" exception inCelerityResourceController to make…
Branches
Unknown
Tags
Unknown

Event Timeline