Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception rendering a commit in Diffusion when bugtraq.url = null
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. In the browser, go to http://phorge.localhost/diffusion/query/all/
  21. Under the R19 gitRepoEmpty, click the 999a2c7d1ff8: first commit link to go to http://phorge.localhost/R19:999a2c7d1ff86eff7dd33eed5db926d744f813a6
[2023-06-12 01:04:54] 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=diffusionBrowseCommit, ref.master=9b99123ff931, ref.diffusionBrowseCommit=9b99123ff931)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/diffusion/controller/DiffusionCommitController.php:925]
  #1 <#2> DiffusionCommitController::linkBugtraq(string) called at [<phorge>/src/applications/diffusion/controller/DiffusionCommitController.php:193]
  #2 <#2> DiffusionCommitController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #3 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #4 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #5 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #6 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Related Objects