Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception blocks rendering creation form pages for Legalpad, Macro, Settings
Closed, ResolvedPublic

Description

  1. PHP 8.1.8, on top D25144, D25145, D25146, D25147, D25150, D25151, D25152, D25153, D25154, D25155, D25156, D25158 locally applied

2.1 Go to http://phorge.localhost/legalpad/ and select Create Document;
2.2 or go to http://phorge.localhost/macro/ and select Create Macro;
2.3 or go to http://phorge.localhost/settings/ and select Create Global Defaults

Legalpad at http://phorge.localhost/legalpad/edit/ :

[2023-04-30 12:34:33] 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=82d1abd4edd1), phorge(head=D25159, ref.master=562d36ef5f9e, ref.D25159=562d36ef5f9e)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:944]
  #1 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/legalpad/controller/LegalpadDocumentEditController.php:8]
  #2 <#2> LegalpadDocumentEditController::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:204]
  #7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Macro at http://phorge.localhost/macro/create/ :

[2023-04-30 12:35:23] 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=82d1abd4edd1), phorge(head=D25159, ref.master=562d36ef5f9e, ref.D25159=562d36ef5f9e)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:944]
  #1 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/macro/controller/PhabricatorMacroEditController.php:8]
  #2 <#2> PhabricatorMacroEditController::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:204]
  #7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Settings at http://phorge.localhost/settings/builtin/global/ :

[2023-04-30 12:35:57] 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=82d1abd4edd1), phorge(head=D25159, ref.master=562d36ef5f9e, ref.D25159=562d36ef5f9e)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:944]
  #1 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/settings/panel/PhabricatorEditEngineSettingsPanel.php:33]
  #2 <#2> PhabricatorEditEngineSettingsPanel::processRequest(AphrontRequest) called at [<phorge>/src/applications/settings/controller/PhabricatorSettingsMainController.php:107]
  #3 <#2> PhabricatorSettingsMainController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #4 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #5 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #6 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #7 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #8 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

After fixing that line, all three creation form pages get rendered in web browser as expected.