Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception blocks rendering error pages for Packages' Create Package and Fund's Create Initiative
Closed, ResolvedPublic

Description

  1. PHP 8.2.5; Phorge at e9e2c954132cf9d548e0ac9eb7f75c88f8308c8d
  2. ./bin/config set phabricator.show-prototypes true
  3. Go to http://phorge.localhost/fund/
  4. Select Create Initiative in upper right corner to go to http://phorge.localhost/fund/create/
  5. Enter nothing and select Create New Initiative button
[2023-05-06 23:02:28] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=renderDashboardTabPanelContent, ref.master=d47289622650, ref.renderDashboardTabPanelContent=d47289622650), phorge(head=createFund, ref.master=e9e2c954132c, ref.createFund=e9e2c954132c)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:342]
  #1 <#2> PhabricatorModularTransactionType::isEmptyTextTransaction(NULL, array) called at [<phorge>/src/applications/fund/xaction/FundInitiativeMerchantTransaction.php:58]
  #2 <#2> FundInitiativeMerchantTransaction::validateTransactions(FundInitiative, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2871]
  #3 <#2> PhabricatorApplicationTransactionEditor::validateTransaction(FundInitiative, string, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1234]
  #4 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(FundInitiative, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #5 <#2> PhabricatorEditEngine::buildEditResponse(FundInitiative) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #6 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/fund/controller/FundInitiativeEditController.php:8]
  #7 <#2> FundInitiativeEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

After fixing that exception; page with expected errors gets rendered in web browser:

  • Initiatives must have a payable merchant.
  • You must specify a merchant account you control as the recipient of funds from this initiative.
  • Initiatives must have a name.

Similar exception with same code line is triggered when going to http://phorge.localhost/packages/package/edit/form/default/ and selecting the Create Package button, with expected errors to be displayed instead:

  • Each package provided by a publisher must have a unique package key.
  • Packages must have a name.
  • You must select a publisher when creating a package.
  • You can not select this edit policy, because you would no longer be able to edit the object.
[2023-05-06 23:07:13] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=renderDashboardTabPanelContent, ref.master=d47289622650, ref.renderDashboardTabPanelContent=d47289622650), phorge(head=createFund, ref.master=e9e2c954132c, ref.createFund=e9e2c954132c)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:343]
  #1 <#2> PhabricatorModularTransactionType::isEmptyTextTransaction(NULL, array) called at [<phorge>/src/applications/packages/xaction/package/PhabricatorPackagesPackagePublisherTransaction.php:20]
  #2 <#2> PhabricatorPackagesPackagePublisherTransaction::validateTransactions(PhabricatorPackagesPackage, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2871]
  #3 <#2> PhabricatorApplicationTransactionEditor::validateTransaction(PhabricatorPackagesPackage, string, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1234]
  #4 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorPackagesPackage, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #5 <#2> PhabricatorEditEngine::buildEditResponse(PhabricatorPackagesPackage) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #6 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/packages/controller/PhabricatorPackagesPackageEditController.php:9]
  #7 <#2> PhabricatorPackagesPackageEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #12 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.