@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)" exceptions which block rendering the Conduit page

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 T15307

Test Plan:
Applied these two changes (on top `D25144`, `D25145`, `D25146`, `D25147`, `D25150`,
`D25151`, `D25152`, `D25153`, `D25154` locally applied) and `/conduit/` finally
rendered in web browser. Also the page /conduit/query/.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15307

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

+2 -2
+1 -1
src/applications/conduit/query/PhabricatorConduitSearchEngine.php
··· 39 39 $query->withIsInternal(false); 40 40 41 41 $contains = $saved->getParameter('nameContains'); 42 - if (strlen($contains)) { 42 + if (phutil_nonempty_string($contains)) { 43 43 $query->withNameContains($contains); 44 44 } 45 45
+1 -1
src/view/phui/PHUIObjectItemView.php
··· 874 874 'class' => 'phui-oi-status-icon', 875 875 ); 876 876 877 - if (strlen($label)) { 877 + if (phutil_nonempty_string($label)) { 878 878 $options['sigil'] = 'has-tooltip'; 879 879 $options['meta'] = array('tip' => $label, 'size' => 300); 880 880 }