Steps to reproduce:
- Go to https://phabricator.wikimedia.org/diffusion/EWIS/branches/master/composer.json;0df33d42c884c47bac8d23f3da60281c90ed966c (which is running on PHP 7.4 as far as I know)
Actual outcome:
[2024-03-09 01:22:35] EXCEPTION: (RuntimeException) strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior at [<arcanist>/src/error/PhutilErrorHandler.php:261] arcanist(), ava(), phorge(), translations(), wmf-ext-misc() #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<arcanist>/src/error/PhutilErrorHandler.php:261] #1 <#2> strpos(string, integer) called at [<arcanist>/src/utils/PhutilSortVector.php:33] #2 <#2> PhutilSortVector::addString(integer) called at [<phorge>/src/applications/diffusion/controller/DiffusionBranchTableController.php:132] #3 <#2> DiffusionBranchTableController::sortBranches(PhabricatorRepository, array) called at [<phorge>/src/applications/diffusion/controller/DiffusionBranchTableController.php:43] #4 <#2> DiffusionBranchTableController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #5 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] #6 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #7 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #8 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204] #9 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
Additional information:
- See PHP 7.3 related info at https://www.php.net/manual/en/function.strpos.php
- https://we.phorge.it/source/arcanist/browse/master/src/utils/PhutilSortVector.php$32 performs a strpos("\0", $value). $value is $branch->getShortName() being passed in https://we.phorge.it/source/phorge/browse/master/src/applications/diffusion/controller/DiffusionBranchTableController.php$115-132