Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception trying to stop maintenance mode of Diffusion repo
Closed, ResolvedPublic

Description

  1. PHP 8.2.7; Phorge at 1c098c273d06ea3cf8215245ea109f41c59593d9
  2. Go to Diffusion at http://phorge.localhost/diffusion/
  3. Select Create Repository in upper right corner to go to http://phorge.localhost/diffusion/edit/form/default/
  4. Select "Create Git Repository" to go to http://phorge.localhost/diffusion/edit/form/default/?vcs=git
  5. On the Create Repository page, in the Name field, enter gitMaint
  6. Select the Create Repository button and end up on http://phorge.localhost/diffusion/20/manage/
  7. On the terminal/CLI, run ./bin/repository maintenance --start "fooo" R20
  8. See output Put repository "R20" into maintenance mode.
  9. Run ./bin/repository maintenance --stop R20
[2023-06-14 19:21:40] 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]
  #1 PhabricatorRepositoryManagementMaintenanceWorkflow::execute(PhutilArgumentParser) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:492]
  #2 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:377]
  #3 PhutilArgumentParser::parseWorkflows(array) called at [<phorge>/scripts/repository/manage_repositories.php:22]

Event Timeline

Sten subscribed.

Have replicated the fault.

Andre already has a diff already out for this...

I currently don't have time to work on this so feel free to improve the diff (via arcanist/bin/arc patch D25296 / arcanist/bin/arc diff --update D25296).