@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 Conduit's dashboard.panel.edit 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 T15425

Test Plan: Applied this change; afterwards `/conduit/method/dashboard.panel.edit/` correctly renders in browser.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15425

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

+10 -1
+1 -1
src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php
··· 95 95 $section[] = $type->getConduitDescription(); 96 96 97 97 $type_documentation = $type->getConduitDocumentation(); 98 - if (strlen($type_documentation)) { 98 + if (phutil_nonempty_string($type_documentation)) { 99 99 $section[] = $type_documentation; 100 100 } 101 101
+9
src/applications/transactions/editfield/PhabricatorEditField.php
··· 169 169 return $this->conduitDescription; 170 170 } 171 171 172 + /** 173 + * Set the Conduit documentation in raw Remarkup. 174 + * @param string|null $conduit_documentation 175 + * @return self 176 + */ 172 177 public function setConduitDocumentation($conduit_documentation) { 173 178 $this->conduitDocumentation = $conduit_documentation; 174 179 return $this; 175 180 } 176 181 182 + /** 183 + * Get the Conduit documentation in raw Remarkup. 184 + * @return string|null 185 + */ 177 186 public function getConduitDocumentation() { 178 187 return $this->conduitDocumentation; 179 188 }