Page MenuHomePhorge

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

Description

PHP 8.2.13; Phorge was at e610e739cb4294dcab92c3145285a5ffa5c3cf61
I do not have steps to reproduce.
This is just yet another stacktrace which showed up while playing with custom fields (creating tasks, editing tasks, using the Maniphest search) somewhere around T15683, T15684, and T15685.

[2023-12-06 18:42:51] ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php:484]
arcanist(head=master, ref.master=e46025f7a914), phorge(head=master, ref.master=5ddca7da55e3)
  #0 PhabricatorStandardCustomField::updateAbstractDocument(PhabricatorSearchAbstractDocument) called at [<phorge>/src/infrastructure/customfield/field/PhabricatorCustomField.php:1385]
  #1 PhabricatorCustomField::updateAbstractDocument(PhabricatorSearchAbstractDocument) called at [<phorge>/src/infrastructure/customfield/field/PhabricatorCustomFieldList.php:323]
  #2 PhabricatorCustomFieldList::updateAbstractDocument(PhabricatorSearchAbstractDocument) called at [<phorge>/src/infrastructure/customfield/engineextension/PhabricatorCustomFieldFulltextEngineExtension.php:36]
  #3 PhabricatorCustomFieldFulltextEngineExtension::enrichFulltextObject(ManiphestTask, PhabricatorSearchAbstractDocument) called at [<phorge>/src/applications/search/index/PhabricatorFulltextEngine.php:47]
  #4 PhabricatorFulltextEngine::buildFulltextIndexes() called at [<phorge>/src/applications/search/engineextension/PhabricatorFulltextIndexEngineExtension.php:51]
  #5 PhabricatorFulltextIndexEngineExtension::indexObject(ManiphestTaskFulltextEngine, ManiphestTask) called at [<phorge>/src/applications/search/index/PhabricatorIndexEngine.php:78]
  #6 PhabricatorIndexEngine::indexObject() called at [<phorge>/src/applications/search/worker/PhabricatorSearchWorker.php:84]
  #7 PhabricatorSearchWorker::doWork() called at [<phorge>/src/infrastructure/daemon/workers/PhabricatorWorker.php:124]
  #8 PhabricatorWorker::executeTask() called at [<phorge>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:160]
  #9 PhabricatorWorkerActiveTask::executeTask() called at [<phorge>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
  #10 PhabricatorTaskmasterDaemon::run() called at [<phorge>/src/infrastructure/daemon/PhutilDaemon.php:219]
  #11 PhutilDaemon::execute() called at [<phorge>/scripts/daemon/exec/exec_daemon.php:131]