mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 02:02:40 +01:00
ef73b12b58
Summary: Code checking if the needle string `$value` is somewhere in the haystack `"\0"` makes no sense for a single byte (if it did, then `strcmp` instead of `strpos` should have been used) and the created exception output implies that it's supposed to check that a string does not contain NULL bytes. Thus switch the order of arguments passed to `strpos()` to be correct. ``` 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] #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] ``` Closes T15755 Test Plan: Read the surrounding code carefully. Reviewers: O1 Blessed Committers, valerio.bozzolan, speck Reviewed By: O1 Blessed Committers, valerio.bozzolan, speck Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15755 Differential Revision: https://we.phorge.it/D25557 |
||
---|---|---|
.. | ||
__tests__ | ||
AbstractDirectedGraph.php | ||
ArcanistNonblockingGuard.php | ||
CaseInsensitiveArray.php | ||
PhutilArray.php | ||
PhutilArrayCheck.php | ||
PhutilArrayWithDefaultValue.php | ||
PhutilBufferedIterator.php | ||
PhutilCallbackFilterIterator.php | ||
PhutilChunkedIterator.php | ||
PhutilCowsay.php | ||
PhutilDirectedScalarGraph.php | ||
PhutilEditDistanceMatrix.php | ||
PhutilExampleBufferedIterator.php | ||
PhutilExecutionEnvironment.php | ||
PhutilHashingIterator.php | ||
PhutilLunarPhase.php | ||
PhutilProxyIterator.php | ||
PhutilRope.php | ||
PhutilSortVector.php | ||
PhutilStreamIterator.php | ||
PhutilSystem.php | ||
PhutilUTF8StringTruncator.php | ||
utf8.php | ||
utils.php | ||
viewutils.php |