Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception blocks rendering commit page in Diffusion
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. PHP 8.2.7; Phorge at 108cbcd09bd39fda0ad24a2ee25afe5aac230e08
  2. Make sure that http://phorge.localhost/config/edit/bugtraq.url/ is not set
  3. Check that http://phorge.localhost/config/edit/repository.default-local-path/ is set to default /var/repo/
  4. Make sure that /var/repo/ exists locally
  5. As a Phorge admin, go to Diffusion at http://phorge.localhost/diffusion/
  6. Select Create Repository in upper right corner to go to http://phorge.localhost/diffusion/edit/form/default/
  7. Select "Create Git Repository" to go to http://phorge.localhost/diffusion/edit/form/default/?vcs=git
  8. On the Create Repository page, in the Name field, enter gitRepoEmpty
  9. Select the Create Repository button
  10. End up on http://phorge.localhost/diffusion/19/manage/
  11. Select Activate Repository in the left panel (while no directory exists for this code repository)
  12. Wait a minute for daemons to create the repository
  13. In a terminal, go to now existing /var/repo/19/
  14. In a terminal, run git init
  15. In a terminal, run git checkout -b master
  16. In a terminal, run touch newFile
  17. In a terminal, run git add newFile
  18. In a terminal, run git commit -m "first commit" newFile
  19. In the browser, on http://phorge.localhost/diffusion/19/manage/ , select on the right Update Now and select Schedule Update button
  20. Go to http://phorge.localhost/diffusion/commit/query/all/ to find the commit ID of the commit made above (e.g. 999a2c7d1ff8)
  21. Go to http://phorge.localhost/diffusion/19/commit/999a2c7d1ff8 (or whatever your commit ID is)
[2023-06-12 01:26:55] 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=diffusionCallsignHistory, ref.master=9b99123ff931, ref.diffusionCallsignHistory=d5fb6702a49a)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/diffusion/controller/DiffusionCommitController.php:31]
  #1 <#2> DiffusionCommitController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #2 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #3 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #4 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #6 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.