@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 Legalpad signatures

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 T15395

Test Plan: Applied these two changes; afterwards "All Signatures" page at `/legalpad/signatures/1/` gets 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: T15395

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

+2 -2
+2 -2
src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
··· 127 127 } 128 128 129 129 $name_contains = $saved->getParameter('nameContains'); 130 - if (strlen($name_contains)) { 130 + if (phutil_nonempty_string($name_contains)) { 131 131 $query->withNameContains($name_contains); 132 132 } 133 133 134 134 $email_contains = $saved->getParameter('emailContains'); 135 - if (strlen($email_contains)) { 135 + if (phutil_nonempty_string($email_contains)) { 136 136 $query->withEmailContains($email_contains); 137 137 } 138 138