@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 rendering most applications' Configure pages

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.

Added also a small inline documentation to better leave what I find.

Closes T15358

Test Plan:
Applied this change change and way more applications' Configure pages finally rendered in web browser.
For example, `/applications/view/PhabricatorAuditApplication/` is now correctly rendered.
(However, some pages expose followup exceptions to be handled in separate tasks.)

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15358

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

+6 -1
+5
src/applications/base/PhabricatorApplication.php
··· 235 235 return array(); 236 236 } 237 237 238 + /** 239 + * Get the Application Overview in raw Remarkup 240 + * 241 + * @return string|null 242 + */ 238 243 public function getOverview() { 239 244 return null; 240 245 }
+1 -1
src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
··· 114 114 } 115 115 116 116 $overview = $application->getOverview(); 117 - if (strlen($overview)) { 117 + if (phutil_nonempty_string($overview)) { 118 118 $overview = new PHUIRemarkupView($viewer, $overview); 119 119 $properties->addSectionHeader( 120 120 pht('Overview'), PHUIPropertyListView::ICON_SUMMARY);