mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
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
This commit is contained in:
parent
2df7ea13a3
commit
402a63c5de
1 changed files with 3 additions and 1 deletions
|
@ -103,7 +103,9 @@ final class PhutilSearchQueryCompiler
|
|||
|
||||
private function tokenizeQuery($query) {
|
||||
$maximum_bytes = 1024;
|
||||
|
||||
if ($query === null) {
|
||||
$query = '';
|
||||
}
|
||||
$query_bytes = strlen($query);
|
||||
if ($query_bytes > $maximum_bytes) {
|
||||
throw new PhutilSearchQueryCompilerSyntaxException(
|
||||
|
|
Loading…
Reference in a new issue