1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00
phorge-phorge/src
bob 6ec89e9f08 Fix a PHP 8.1 deprecated use of strlen with a NULL argument
Summary:
With PHP 8.1+ it was not possible to view a commit from subversion repositories.
Indeed, if the commit user and/or email is not properly defined, strlen(null) is called, causing a deprecation warning, elevated to exception.
Using strlen() to check string validity 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.

Fix T15609

Test Plan:
- Apply D25397 and D25398
- Sign in
- Open a diffusion SVN repository
- Open a commit without user name and or email
- You should not see the same Runtime Exception (unfortunately, there is another one as described in T15610)

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15609

Differential Revision: https://we.phorge.it/D25399
2023-08-18 12:48:18 +02:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Correct spelling mistakes 2023-05-27 22:19:06 +01:00
applications Fix a PHP 8.1 deprecated use of strlen with a NULL argument 2023-08-18 12:48:18 +02:00
docs Generalize references to PHP 5.x Debian/Ubuntu packages 2023-06-29 15:58:54 +03:00
extensions
infrastructure Rebrand: Add "path" entries to PlatformSymbols 2023-08-18 02:00:41 -07:00
view Unify type-checking for setHref() type methods 2023-08-12 08:39:13 -07:00
__phutil_library_init__.php Rebrand: Rename library and update "version" logic 2022-08-25 01:26:21 -07:00
__phutil_library_map__.php Fix PHP 8.1 issue in DifferentialChangeset getOldStatePathVector() 2023-08-12 08:39:36 +01:00