HomePhorge

Fix PHP 8.1 "explode(null)" exception which blocks rendering "Provide Multi…

Description

Fix PHP 8.1 "explode(null)" exception which blocks rendering "Provide Multi-Factor Credentials" page

Summary:
Passing null to the $string in explode(string $separator, string $string, int $limit) is deprecated since PHP 8.1.
Thus do not explode but create an empty array if the input is null.

Closes T15397

Test Plan: Applied this change and afterwards the "Provide Multi-Factor Credentials" page at /auth/finish/ showing the "App Code" field correctly rendered in the web browser.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15397

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

Details

Provenance
Andre KlapperAuthored on May 20 2023, 10:56 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPc1c7699c9891: Fix PHP 8.1 "strlen(null)" exceptions which block rendering the DarkConsole
Branches
Unknown
Tags
Unknown

Event Timeline