From 18e32d6ec7f74c2cef5d294b7f206e9786c1e41e Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 27 Aug 2015 22:08:49 +1000 Subject: [PATCH] Fix linter rule after XHPAST change Summary: Depends on D13959. Test Plan: Ran unit tests. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D13961 --- .../xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php index 5ee6f3fe7..e2f627a32 100644 --- a/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php @@ -327,7 +327,7 @@ private function lintPHP53Features(XHPASTNode $root) { $ternaries = $root->selectDescendantsOfType('n_TERNARY_EXPRESSION'); foreach ($ternaries as $ternary) { - $yes = $ternary->getChildByIndex(1); + $yes = $ternary->getChildByIndex(2); if ($yes->getTypeName() === 'n_EMPTY') { $this->raiseLintAtNode( $ternary,