@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 "strlen(null)" exception which blocks loading icons when creating new Diffusion repository

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.

Closes T15301

Test Plan: Applied this change (on top of D25150) and icons 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: T15301

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

+1 -1
+1 -1
src/applications/files/controller/PhabricatorFileDataController.php
··· 69 69 // an initial request for bytes 0-1 of the audio file, and things go south 70 70 // if we can't respond with a 206 Partial Content. 71 71 $range = $request->getHTTPHeader('range'); 72 - if (strlen($range)) { 72 + if (phutil_nonempty_string($range)) { 73 73 list($begin, $end) = $response->parseHTTPRange($range); 74 74 } 75 75