Page MenuHomePhorge

PHP 8.1 "strlen(null)" exceptions block rendering Browse Repositories overlay dialog
Closed, ResolvedPublic

Description

  1. PHP 8.2.6; Phorge at b1edfea09bad48c267b547918e82d6de43298781
  2. Go to Differential at http://phorge.localhost/differential/
  3. Select Create Diff in upper right corner to go to http://phorge.localhost/differential/diff/create/
  4. Next to the Repository field, select the magnifier button
[2023-05-24 15:37:29] 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=e4fd31ec024e), phorge(head=sciencePhriction, ref.master=b1edfea09bad, ref.sciencePhriction=5af29d8e56f2)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php:44]
  #1 <#2> DiffusionRepositoryDatasource::loadResults() called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:142]
  #2 <#2> PhabricatorTypeaheadDatasource::loadResultsForPhase(string, integer) called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:136]
  #3 <#2> PhabricatorTypeaheadCompositeDatasource::loadResultsForPhase(string, integer) called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:48]
  #4 <#2> PhabricatorTypeaheadCompositeDatasource::loadResults() called at [<phorge>/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php:91]
  #5 <#2> PhabricatorTypeaheadModularDatasourceController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #6 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #7 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #8 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #9 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #10 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that exception; get next exception:

[2023-05-24 15:39:01] 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=e4fd31ec024e), phorge(head=DipherentialSearch, ref.master=b1edfea09bad, ref.DipherentialSearch=b1edfea09bad)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/repository/storage/PhabricatorRepository.php:220]
  #1 <#2> PhabricatorRepository::getAllMonograms() called at [<phorge>/src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php:53]
  #2 <#2> DiffusionRepositoryDatasource::loadResults() called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:142]
  #3 <#2> PhabricatorTypeaheadDatasource::loadResultsForPhase(string, integer) called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:136]
  #4 <#2> PhabricatorTypeaheadCompositeDatasource::loadResultsForPhase(string, integer) called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:48]
  #5 <#2> PhabricatorTypeaheadCompositeDatasource::loadResults() called at [<phorge>/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php:91]
  #6 <#2> PhabricatorTypeaheadModularDatasourceController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #7 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #8 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #9 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #10 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #11 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that exception; afterwards Browse Repositories overlay dialog gets rendered in web browser and lists existing repositories.