HomePhorge

Fix PHP 8.1 "explode(null)" exception which blocks rendering the Multimeter page

Description

Fix PHP 8.1 "explode(null)" exception which blocks rendering the Multimeter page

Summary:
Passing null as an input string to explode() is deprecated in PHP 8.
Thus first check via phutil_nonempty_string() that the input string is not null.

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.

Closes T15361

Test Plan: Applied this change; afterwards /multimeter/ correctly rendered in web browser.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15361

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

Details

Provenance
Andre KlapperAuthored on May 29 2023, 3:35 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP827f63a06543: Cleanup unused cowsay files (related to legacy Perl binary version)
Branches
Unknown
Tags
Unknown

Event Timeline