Page MenuHomePhabricator

D13961.diff
No OneTemporary

D13961.diff

diff --git a/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
--- a/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
+++ b/src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
@@ -327,7 +327,7 @@
$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,

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 9:37 AM (1 h, 41 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7028593
Default Alt Text
D13961.diff (650 B)

Event Timeline