1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-03 18:38:27 +01:00
phorge-phorge/src/applications/repository
Andre Klapper 9f1814f490 Fix PHP 8.1 "strlen(null)" and "preg_match()" exceptions which block repository creation
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 T15337

Test Plan: Applied these four changes and `/diffusion/4/manage/` finally 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: T15337

Differential Revision: https://we.phorge.it/D25182
2023-05-19 17:18:37 +02:00
..
codex When destorying a repository, print a notification about removing the working copy 2017-08-01 08:57:39 -07:00
conduit Update Diffusion conduit text 2017-07-02 14:25:10 +00:00
config Remove product literal strings in "pht()", part 22 2022-04-25 16:46:26 -07:00
constants Simplify Create Repository page 2017-08-15 11:05:50 -07:00
customfield Move various other callsites away from callsigns 2016-01-04 06:54:42 -08:00
daemon Add support to marking commits as UNREACHABLE for Mercurial 2021-09-04 19:05:08 -04:00
data Collapse repository URI normalization code into Arcanist 2020-06-30 15:54:33 -07:00
editor Fix PHP 8.1 "strlen(null)" and "preg_match()" exceptions which block repository creation 2023-05-19 17:18:37 +02:00
engine PHP 8.2: fixes for strlen() not accepting NULL anymore, part 1 2023-03-31 22:05:52 +02:00
graphcache Bail out of PhabricatorRepositoryGraphCache more aggressively after cache fills 2017-10-06 14:12:58 -07:00
mail Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
management Remove product literal strings in "pht()", part 8 2022-04-25 12:22:29 -07:00
phid Remove "State Icons" from handles 2019-10-31 12:04:43 -07:00
query Provide a default "loadPage()" implementation on "CursorPagedPolicyAwareQuery" 2022-05-24 10:18:53 -07:00
response Return Git HTTP error messages in an HTTP header 2021-01-26 16:14:03 -08:00
search Add controllers/search/edit engine functionality to RepositoryIdentity 2018-05-31 07:03:25 -07:00
storage PHP 8.2: fixes for strlen() not accepting NULL anymore, part 1 2023-03-31 22:05:52 +02:00
worker Internally, align commit processing tasks around PHIDs, not IDs 2021-02-02 13:40:10 -08:00
xaction Remove product literal strings in "pht()", part 23 2022-04-25 16:46:26 -07:00