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/diffusion
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
..
application Remove the "Graph" view as a dedicated repository view 2020-08-12 08:59:16 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
conduit PHP 8.2: fixes for deprecated use of ${var} in strings 2023-03-26 22:08:22 +02:00
config Remove product literal strings in "pht()", part 17 2022-04-25 16:46:25 -07:00
controller Fix PHP 8.1 "strlen(null)" and "preg_match()" exceptions which block repository creation 2023-05-19 17:18:37 +02:00
data Make "CommitData" wrap and persist a "CommitRef" record 2020-09-15 17:36:40 -07:00
document Add a view option to disable blame in Diffusion and fix some view transition bugs 2018-04-30 15:32:23 -07:00
doorkeeper Modernize and clean up "PhabricatorAuditStatusConstants" 2021-03-10 09:21:55 -08:00
edge Allow revisions to revert commits and one another, and commits to revert revisions 2018-02-02 08:25:58 -08:00
editfield Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
editor Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
engine Allow maintenance scripts to write synthetic events to the push log that act as repository updates 2021-06-01 08:29:54 -07:00
engineextension Correct minor "jump to symbol" behavior in Differential 2021-03-17 15:32:07 -07:00
exception Filter and reject "--config" and "--debugger" flags to Mercurial in any position 2017-11-10 08:42:07 -08:00
garbagecollector Support ID-based repository URIs, and canonicalize repository URIs 2016-02-18 09:56:28 -08:00
gitlfs Fix a missing getSSHUser() callsite 2018-01-31 15:34:12 -08:00
harbormaster Pass commit authorship information to Buildkite 2018-08-27 12:52:11 -07:00
herald Fix an issue where Herald may fail to extract content from an empty commit 2022-04-20 13:04:00 -07:00
identity Add a "--dry-run" flag to "bin/repository rebuild-identities" 2019-11-19 12:38:20 -08:00
management Fix PHP 8.1 "strlen(null)" and "preg_match()" exceptions which block repository creation 2023-05-19 17:18:37 +02:00
panel Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
protocol Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
query Provide a default "loadPage()" implementation on "CursorPagedPolicyAwareQuery" 2022-05-24 10:18:53 -07:00
ref Allow repository service lookups to return an ordered list of service refs 2019-09-03 10:05:40 -07:00
relationships Convert all standard relationship-editing actions to modern Relationships code 2016-06-29 11:24:52 -07:00
remarkup Add a "{src ...}" Remarkup rule to provide a more flexible way to reference source files in Diffusion 2019-05-21 13:12:28 -07:00
request Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
response Implement a Git LFS server which supports no operations 2016-03-17 08:08:43 -07:00
searchfield Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
ssh Remove product literal strings in "pht()", part 18 2022-04-25 16:46:25 -07:00
symbol Provide character position information to symbol queries 2018-01-26 13:01:57 -08:00
typeahead Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
view Remove history query from DiffusionRepositoryController as it is unused 2021-09-04 18:50:46 -04:00
worker When updating revisions in responset to commits, use the omnipotent viewer to pull diffs 2021-03-01 11:11:34 -08:00
xaction Modernize and clean up "PhabricatorAuditStatusConstants" 2021-03-10 09:21:55 -08:00
DiffusionCommitAuditStatus.php Enrich "diffusion.commit.search" with identity, status, and message information 2018-09-12 12:45:44 -07:00
DiffusionLintSaveRunner.php Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00