1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 13:51:02 +01:00
phorge-phorge/src/applications/repository
Steve Campbell cb9fcf18d5 Fix PHP 8.1 "strlen(null)" exception trying to stop maintenance mode of Diffusion repo
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.

Use `isset` instead to check if the argument "start" was passed to the CLI command.

```
EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=97e163187418), phorge(head=repoMaintStartHistory, ref.master=1c098c273d06, ref.repoMaintStartHistory=0a4a34143528)
  #0 PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/repository/management/PhabricatorRepositoryManagementMaintenanceWorkflow.php:45]
```

Closes T15476

Test Plan: After applying this change, executing `./bin/repository maintenance --stop R1` on the CLI shows `Took repository "R1" out of maintenance mode.` as expected, instead of an exception.

Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper, avivey

Reviewed By: O1 Blessed Committers, valerio.bozzolan, avivey

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

Maniphest Tasks: T15476

Differential Revision: https://we.phorge.it/D25296
2023-07-18 09:06:25 +01: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 Fix PHP 8.1 "strlen(null)" exception trying to stop maintenance mode of Diffusion repo 2023-07-18 09:06:25 +01:00
phid Remove "State Icons" from handles 2019-10-31 12:04:43 -07:00
query Fix PHP 8.1 "strlen(null)" exception which blocks rendering a Diffusion repository page 2023-05-30 10:54:22 +02: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 Fix PhabricatorRepository generateURI PHP 8.1 strlen(null) errors 2023-07-17 11:07:25 +01:00
worker Correct spelling mistakes 2023-05-27 22:19:06 +01:00
xaction Fix PHP 8.1 "strlen(null)" exception on History page of Diffusion repo after setting maintenance mode 2023-07-05 19:41:51 +02:00