1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Fix PHP 8.1 "strlen(null)" exception inCelerityResourceController to make CSS/JS load

Summary:
On a fresh installation with PHP 8.1, CSS does not load on the account creation page.

Closes T15283

Test Plan: After applying this change (and D25137), the account creation page is rendered correctly. See the screenshot in T15283

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15283

Differential Revision: https://we.phorge.it/D25138
This commit is contained in:
Andre Klapper 2023-04-27 10:49:06 +02:00
parent 7b080db57c
commit f3b3741316

View file

@ -113,7 +113,7 @@ abstract class CelerityResourceController extends PhabricatorController {
$range = AphrontRequest::getHTTPHeader('Range'); $range = AphrontRequest::getHTTPHeader('Range');
if (strlen($range)) { if (phutil_nonempty_string($range)) {
$response->setContentLength(strlen($data)); $response->setContentLength(strlen($data));
list($range_begin, $range_end) = $response->parseHTTPRange($range); list($range_begin, $range_end) = $response->parseHTTPRange($range);