@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 "Browse Dashboards" dialog

Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.

But, that function does not accept null anymore since PHP 8.1.

Closes T15396

Test Plan: Applied this change (on top of D25179 and D25226) and the "Browse Dashboards" dialog got 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: T15396

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

+3 -1
+3 -1
src/applications/search/compiler/PhutilSearchQueryCompiler.php
··· 103 103 104 104 private function tokenizeQuery($query) { 105 105 $maximum_bytes = 1024; 106 - 106 + if ($query === null) { 107 + $query = ''; 108 + } 107 109 $query_bytes = strlen($query); 108 110 if ($query_bytes > $maximum_bytes) { 109 111 throw new PhutilSearchQueryCompilerSyntaxException(