Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception creating Maniphest task when custom select field configured
Closed, ResolvedPublic

Description

  1. PHP 8.2.13; Phorge at 99ee9357eff29f450526607cabec9ec557cfdec3, followup to T15683
  2. Have a select type custom field defined under http://phorge.localhost/config/edit/maniphest.custom-field-definitions/ like
{
  "risk.rating": {
    "name": "Risk Rating",
    "search": true,
    "type": "select",
    "options": {
      "": "N/A",
      "info": "Informational",
      "low": "Low",
      "medium": "Medium",
      "high": "High",
      "crit": "Critical"
    }
  }
}
  1. Make sure this custom field is visible in the task creation form you are about to use
  2. Try to create a new task
[2023-12-09 23:45:02] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(), ava(), phorge(), wmf-ext-misc()
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php:14]
  #1 <#2> PhabricatorStandardCustomFieldSelect::buildFieldIndexes() called at [<phorge>/src/infrastructure/customfield/field/PhabricatorCustomField.php:666]
  #2 <#2> PhabricatorCustomField::buildFieldIndexes() called at [<phorge>/src/infrastructure/customfield/field/PhabricatorCustomFieldList.php:268]
  #3 <#2> PhabricatorCustomFieldList::rebuildIndexes(ManiphestTask) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1539]
  #4 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(ManiphestTask, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #5 <#2> PhabricatorEditEngine::buildEditResponse(ManiphestTask) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #6 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/maniphest/controller/ManiphestTaskEditController.php:12]
  #7 <#2> ManiphestTaskEditController::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]
[2023-12-09 23:45:02] EXCEPTION: (PhabricatorFileIntegrityException) File data integrity check failed. Dark forces have corrupted or tampered with this file. The file data can not be read. at [<phorge>/src/applications/files/engine/PhabricatorFileStorageEngine.php:342]
arcanist(), ava(), phorge(), wmf-ext-misc()
  #0 <#2> PhabricatorFileStorageEngine::getRawFileDataIterator(PhabricatorFile, NULL, NULL, PhabricatorFileRawStorageFormat) called at [<phorge>/src/applications/files/storage/PhabricatorFile.php:815]
  #1 <#2> PhabricatorFile::getFileDataIterator(NULL, NULL) called at [<phorge>/src/applications/files/controller/PhabricatorFileDataController.php:127]
  #2 <#2> PhabricatorFileDataController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #3 phlog(PhabricatorFileIntegrityException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #4 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, PhabricatorFileIntegrityException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #5 AphrontApplicationConfiguration::handleThrowable(PhabricatorFileIntegrityException) 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

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.