mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Use string operations, not idx(), for string indexing.
Summary: Missed this in review (D1715), idx() does not operate on strings (maybe it does in HPHP/i?). Test Plan: Faked an editable lint warning, ran "arc lint". Reviewers: Koolvin, andrewjcg, btrahan Reviewed By: Koolvin CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1728
This commit is contained in:
parent
2fa18d80f8
commit
b3a70ac206
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ final class ArcanistLintRenderer {
|
|||
if ($message->isPatchable()) {
|
||||
// Strip trailing newlines, since "explode" will create an extra patch
|
||||
// line for these.
|
||||
if (idx($patch, strlen($patch) - 1, null) === "\n") {
|
||||
if (strlen($patch) && ($patch[strlen($patch) - 1] === "\n")) {
|
||||
$patch = substr($patch, 0, -1);
|
||||
}
|
||||
$patch_lines = explode("\n", $patch);
|
||||
|
|
Loading…
Reference in a new issue