Page MenuHomePhorge

PHP 8.1 "json_decode(null)" exception blocks creating Almanac Hosts blueprint in Drydock
Closed, ResolvedPublic

Description

  1. PHP 8.2.6; Phorge at b1edfea09bad48c267b547918e82d6de43298781 with D25239 on top
  2. Go to Drydock at http://phorge.localhost/drydock/
  3. Select Blueprints to go to http://phorge.localhost/drydock/blueprint/
  4. Select Create Blueprint in upper right corner to go to http://phorge.localhost/drydock/blueprint/edit/form/default/
  5. Under Blueprint Type, select Almanac Hosts
  6. Select Continue button to go to http://phorge.localhost/drydock/blueprint/edit/form/default/
  7. On http://phorge.localhost/drydock/blueprint/edit/form/default/ , enter nothing and just click the Create Blueprint button
[2023-05-23 19:15:07] 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=D25240, ref.master=b1edfea09bad, ref.D25240=b1edfea09bad)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php:392]
  #1 <#2> PhabricatorStandardCustomField::isValueEmpty(NULL) called at [<phorge>/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php:368]
  #2 <#2> PhabricatorStandardCustomField::validateApplicationTransactions(DrydockBlueprintEditor, string, array) called at [<phorge>/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php:193]
  #3 <#2> PhabricatorStandardCustomFieldPHIDs::validateApplicationTransactions(DrydockBlueprintEditor, string, array) called at [<phorge>/src/infrastructure/customfield/field/PhabricatorCustomField.php:1013]
  #4 <#2> PhabricatorCustomField::validateApplicationTransactions(DrydockBlueprintEditor, string, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2923]
  #5 <#2> PhabricatorApplicationTransactionEditor::validateTransaction(DrydockBlueprint, string, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1234]
  #6 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(DrydockBlueprint, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #7 <#2> PhabricatorEditEngine::buildEditResponse(DrydockBlueprint) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #8 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/drydock/controller/DrydockBlueprintEditController.php:26]
  #9 <#2> DrydockBlueprintEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #10 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #11 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #12 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #13 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #14 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

After fixing that issue, the Create Blueprint page on http://phorge.localhost/drydock/blueprint/edit/form/default/ correctly shows the two expected errors:

  • Almanac Services is required.
  • Blueprints must have a name.

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.