@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 "Add Panel to Dashboard" overlay dialog

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 T15305

Test Plan:
Applied these two changes (on top of `D25144`, `D25145`, `D25146`, `D25147`, `D25150`,
`D25151`, `D25152`, `D25153`, `D25154`)) and "Use Results -> Add Panel to Dashboard"
overlay dialog finally 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: T15305

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

+2 -2
+2 -2
src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php
··· 13 13 $e_name = true; 14 14 15 15 $v_engine = $request->getStr('engine'); 16 - if (!strlen($v_engine)) { 16 + if (!phutil_nonempty_string($v_engine)) { 17 17 $v_engine = $request->getURIData('engineKey'); 18 18 } 19 19 20 20 $v_query = $request->getStr('query'); 21 - if (!strlen($v_query)) { 21 + if (!phutil_nonempty_string($v_query)) { 22 22 $v_query = $request->getURIData('queryKey'); 23 23 } 24 24