1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00
phorge-phorge/src/infrastructure/query
Andre Klapper 3a3112f67b Fix PHP 8.1 "strlen(null)" and preg_match() exceptions which block rendering "Browse Subscribers" overlay dialog
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.

Similarly, `preg_match()` does not accept passing `null` as `$subject` parameter since PHP 8.1.

Closes T15381

Test Plan: Applied these two changes (on top of D25179 and D25213), and on the task creation page, after clicking the magnifier icon in the "Subscribers" field, the "Browse Subscribers" overlay dialog got rendered.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15381

Differential Revision: https://we.phorge.it/D25214
2023-05-12 12:02:15 +02:00
..
constraint Support some QueryConstraint operations against generic ApplicationSearch query logic 2018-02-22 12:49:49 -08:00
exception Make the UI when you use an invalid cursor ("?after=19874189471232892") a little nicer 2019-03-19 13:04:07 -07:00
order Drive Maniphest grouping and ordering through standard infrastructure 2015-06-08 12:23:13 -07:00
policy Fix PHP 8.1 "strlen(null)" and preg_match() exceptions which block rendering "Browse Subscribers" overlay dialog 2023-05-12 12:02:15 +02:00
PhabricatorOffsetPagedQuery.php Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
PhabricatorQuery.php Fix a PHP 8.1 strlen() issue with "mysql.pass" configuration 2021-12-16 15:24:21 -08:00