Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception when importing a subversion commit
Closed, ResolvedPublic

Description

When Phorge import a new commit (from an observed repository), a RuntimeException is thrown with the following stacktrace :

[2023-08-28 12:35:31] 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=df6c315ace5f), phorge(head=master, ref.master=0ec3291ff4a9)
  #0 PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:39]
  #1 PhabricatorRepositoryCommitMessageParserWorker::updateCommitData(PhabricatorRepositoryCommit, PhabricatorRepositoryCommitData) called at [<phorge>/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:24]
  #2 PhabricatorRepositoryCommitMessageParserWorker::parseCommit(PhabricatorRepository, PhabricatorRepositoryCommit) called at [<phorge>/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php:72]
  #3 PhabricatorRepositoryCommitParserWorker::doWork() called at [<phorge>/src/infrastructure/daemon/workers/PhabricatorWorker.php:124]
  #4 PhabricatorWorker::executeTask() called at [<phorge>/src/infrastructure/daemon/workers/PhabricatorWorker.php:166]
  #5 PhabricatorWorker::scheduleTask(string, array, array) called at [<phorge>/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:257]
  #6 PhabricatorRepositoryManagementReparseWorkflow::execute(PhutilArgumentParser) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:492]
  #7 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:377]
  #8 PhutilArgumentParser::parseWorkflows(array) called at [<phorge>/scripts/repository/manage_repositories.php:22]