At least twice today I had Phabricator bailing out when browsing a task. The last one was while browsing https://phabricator.wikimedia.org/T325245 which gave me:
Unhandled Exception ("RuntimeException")
WARNING: Invalid argument supplied for foreach()
From logstash, it might be:
[2023-03-28 13:10:34] EXCEPTION: (RuntimeException) Invalid argument supplied for foreach() at [<arcanist>/src/error/PhutilErrorHandler.php:261] arcanist(), ava(), phabricator(), translations(), wmf-ext-misc() #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<wmf-ext-misc>/src/customfields/GitLabPatchesCustomField.php:113] #1 <#2> GitLabPatchesCustomField::getMergeRequestsForTask(string) called at [<wmf-ext-misc>/src/customfields/GitLabPatchesCustomField.php:63] #2 <#2> GitLabPatchesCustomField::shouldAppearInPropertyView() called at [<phabricator>/src/infrastructure/customfield/field/PhabricatorCustomField.php:299] #3 <#2> PhabricatorCustomField::shouldEnableForRole(string) called at [<phabricator>/src/infrastructure/customfield/field/PhabricatorCustomField.php:93] #4 <#2> PhabricatorCustomField::getObjectFields(ManiphestTask, string) called at [<phabricator>/src/applications/maniphest/controller/ManiphestTaskDetailController.php:24] #5 <#2> ManiphestTaskDetailController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #6 phlog(RuntimeException) called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] #7 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #8 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #9 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:204] #10 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:35]'
Maybe due to the widget added to Phabricator and fetching Gitlab patches ( T324149)