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,