Upstreamed as https://we.phorge.it/T16455
From our error logs:
[2023-11-27 22:32:12] EXCEPTION: (InvalidArgumentException) Call to phutil_nonempty_string() expected null or a string, got: bool. at [<arcanist>/src/utils/utils.php:2124] arcanist(), ava(), phorge(), translations(), wmf-ext-misc() #0 <#2> phutil_nonempty_string(boolean) called at [<phorge>/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php:200] #1 <#2> PhabricatorEmbedFileRemarkupRule::renderImageFile(PhabricatorFile, PhabricatorObjectHandle, array) called at [<phorge>/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php:97] #2 <#2> PhabricatorEmbedFileRemarkupRule::renderObjectEmbed(PhabricatorFile, PhabricatorObjectHandle, array) called at [<phorge>/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php:135] #3 <#2> PhabricatorObjectRemarkupRule::renderObjectEmbedForAnyMedia(PhabricatorFile, PhabricatorObjectHandle, string) called at [<phorge>/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php:423] #4 <#2> PhabricatorObjectRemarkupRule::didMarkupText() called at [<phorge>/src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php:362] #5 <#2> PhutilRemarkupEngine::postprocessText(array) called at [<phorge>/src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php:106] #6 <#2> PhutilRemarkupEngine::markupText(string) called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:620] #7 <#2> PhabricatorMarkupEngine::extractPHIDsFromMentions(PhabricatorUser, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2060] #8 <#2> PhabricatorApplicationTransactionEditor::buildSubscribeTransaction(ManiphestTask, array, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2224] #9 <#2> PhabricatorApplicationTransactionEditor::expandSupportTransactions(ManiphestTask, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1222] #10 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(ManiphestTask, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:2031] #11 <#2> PhabricatorEditEngine::buildCommentResponse(ManiphestTask) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:998] #12 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/maniphest/controller/ManiphestTaskEditController.php:12] #13 <#2> ManiphestTaskEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #14 phlog(InvalidArgumentException) called at [<phorge>/src/aphront/handler/PhabricatorAjaxRequestExceptionHandler.php:27] #15 PhabricatorAjaxRequestExceptionHandler::handleRequestThrowable(AphrontRequest, InvalidArgumentException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #16 AphrontApplicationConfiguration::handleThrowable(InvalidArgumentException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #17 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204] #18 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
but wondering why this code does isset($options['alt']) instead of $file->getCustomAltText() anyway