1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00
phorge-phorge/src
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
..
__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 PHP 8.1 "strlen(null)" exception trying to stop maintenance mode of Diffusion repo 2023-07-18 09:06:25 +01:00
docs Generalize references to PHP 5.x Debian/Ubuntu packages 2023-06-29 15:58:54 +03:00
extensions
infrastructure Fix PHP 8.1 PhabricatorEditorURIEngine::newForViewer() trim(NULL) error 2023-07-17 11:03:52 +01:00
view Update a couple of lingering instances of secure.phabricator.com to we.phorge.it 2023-06-30 12:01:54 -04: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 DifferentialBranchField getBranchDescription strlen(null) error 2023-07-05 16:06:26 +01:00