@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+1 -1
+1 -1
src/applications/auth/storage/PhabricatorAuthChallenge.php
··· 56 56 AphrontRequest $request) { 57 57 assert_instances_of($challenges, __CLASS__); 58 58 59 - $token_list = $request->getStr(self::HTTPKEY); 59 + $token_list = $request->getStr(self::HTTPKEY, ''); 60 60 $token_list = explode(' ', $token_list); 61 61 62 62 $token_map = array();