Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception setting a Diffusion repo URI when diffusion.ssh-host is null
Closed, ResolvedPublic

Description

  1. PHP 8.2.6; Phorge at d8d65f3f87ed74a3c500278cbb3f0b7490fff9a7
  2. Make sure that http://phorge.localhost/config/edit/diffusion.ssh-host/ is empty / not set
  3. Go to Diffusion at http://phorge.localhost/diffusion/
  4. Select Create Repository in upper right corner to go to http://phorge.localhost/diffusion/edit/form/default/
  5. Select "Create Git Repository" to go to http://phorge.localhost/diffusion/edit/form/default/?vcs=git
  6. On the Create Repository page, in the Name field, enter gitRepo
  7. Select the Create Repository button and end up on http://phorge.localhost/diffusion/10/manage/
  8. In the sidebar on the left, select URIS to go to http://phorge.localhost/diffusion/10/manage/uris/
  9. In the sidebar on the right, select Add New URI to go to http://phorge.localhost/diffusion/10/uri/edit/
  10. On the Create Repository URI page, in the URI field, enter https://example.com/repository.git
  11. Select Create Repository URI button
[2023-06-03 12:15: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=b325304b6e52), phorge(head=diffusionCreateRepoURI, ref.master=d8d65f3f87ed, ref.diffusionCreateRepoURI=d8d65f3f87ed)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/repository/storage/PhabricatorRepositoryURI.php:755]
  #1 <#2> PhabricatorRepositoryURI::getURINormalizerDomainMap() called at [<phorge>/src/applications/repository/storage/PhabricatorRepositoryURI.php:211]
  #2 <#2> PhabricatorRepositoryURI::getNormalizedURI() called at [<phorge>/src/applications/repository/storage/PhabricatorRepository.php:840]
  #3 <#2> PhabricatorRepository::updateURIIndex() called at [<phorge>/src/applications/diffusion/editor/DiffusionURIEditor.php:497]
  #4 <#2> DiffusionURIEditor::applyFinalEffects(PhabricatorRepositoryURI, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1412]
  #5 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorRepositoryURI, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #6 <#2> PhabricatorEditEngine::buildEditResponse(PhabricatorRepositoryURI) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #7 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/diffusion/controller/DiffusionRepositoryURIEditController.php:18]
  #8 <#2> DiffusionRepositoryURIEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #9 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #10 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #11 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #12 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #13 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.