Homestyx hydra
Diffusion hydra 8a1cfff1e8ab

Fix PHP 8.1 "strlen(null)" and "explode()" exceptions which block rendering…

Description

Fix PHP 8.1 "strlen(null)" and "explode()" exceptions which block rendering Administrator Account Creation page

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.

Similarly, explode(string $separator, string $string, int $limit) does not accept
passing null instead of an actual string as input parameter either anymore.

Closes T15284

Test Plan: Applied these two changes. Afterwards, admin user account was created and Phorge homepage rendered in web browser on a fresh installation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15284

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

Details

Provenance
Andre KlapperAuthored on May 19 2023, 10:59 AM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:402a63c5de96: Fix PHP 8.1 "strlen(null)" exception which blocks rendering "Browse Dashboards"…
Branches
Unknown
Tags
Unknown

Event Timeline