[SOLVED] Uninitialized string offset error in PhutilRemarkupDocumentLinkRule

Observed Behavior:
Uninitialized string offset error recorded in the phd log.

Expected Behavior:
No errors in the log?

Phabricator Version:
37a40d82726b31d45446306b9306b9cd48b219b4 (stable) Promote 2018 Week 36

Reproduction Steps:
Unknown.

Additional information:

Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000] [2019-02-07 18:25:09] ERROR 8: Uninitialized string offset: 0 at [/opt/libphutil/src/markup/engine/remarkup/markuprule/PhutilRemarkupDocumentLinkRule.ph
p:113]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000] arcanist(), phabricator(), phutil()
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #0 PhutilRemarkupDocumentLinkRule::markupAlternateLink(array)
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #1 preg_replace_callback(string, array, string) called at [<phutil>/src/markup/engine/remarkup/markuprule/PhutilRemarkupDocumentLinkRule.php:39]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #2 PhutilRemarkupDocumentLinkRule::apply(string) called at [<phutil>/src/markup/engine/remarkup/blockrule/PhutilRemarkupBlockRule.php:84]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #3 PhutilRemarkupBlockRule::applyRules(string) called at [<phutil>/src/markup/engine/remarkup/blockrule/PhutilRemarkupDefaultBlockRule.php:17]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #4 PhutilRemarkupDefaultBlockRule::markupText(string, NULL) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:232]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #5 PhutilRemarkupEngine::markupBlock(array) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:128]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #6 PhutilRemarkupEngine::preprocessText(string) called at [<phutil>/src/markup/engine/PhutilRemarkupEngine.php:94]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #7 PhutilRemarkupEngine::markupText(string) called at [<phabricator>/src/infrastructure/markup/PhabricatorMarkupEngine.php:602]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #8 PhabricatorMarkupEngine::extractFilePHIDsFromEmbeddedFiles(PhabricatorUser, array) called at [<phabricator>/src/applications/transactions/editor/Ph
abricatorApplicationTransactionEditor.php:3614]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #9 PhabricatorApplicationTransactionEditor::extractFilePHIDs(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transaction
s/editor/PhabricatorApplicationTransactionEditor.php:1019]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #10 PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/repositor
y/worker/PhabricatorRepositoryCommitHeraldWorker.php:80]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #11 PhabricatorRepositoryCommitHeraldWorker::parseCommit(PhabricatorRepository, PhabricatorRepositoryCommit) called at [<phabricator>/src/applications
/repository/worker/PhabricatorRepositoryCommitParserWorker.php:51]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #12 PhabricatorRepositoryCommitParserWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:123]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #13 PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:171]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #14 PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #15 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:219]
Daemon 41774 STDE [Thu, 07 Feb 2019 18:25:11 +0000]   #16 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:131]

This is fixed by https://secure.phabricator.com/D20144, but note that reports without reproduction steps rarely fare this well.

@epriestley - I appreciate that help will necessarily be limited when I fail to provide requested information (especially when I’m not on a release that is less than a month old)…

My hope was the backtrace would provide enough of a clue and it was more to document the backtrace than anything else… I did search https://secure.phabricator.com and discourse prior to creating this just to check it didn’t seem known and I couldn’t did anything up. Thanks for taking the time to diagnose and resolve this! If next time it looks impossible feel free to skip over the report.