Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15293869
D10551.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
918 B
Referenced Files
None
Subscribers
None
D10551.id.diff
View Options
diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php
--- a/src/lint/linter/ArcanistXHPASTLinter.php
+++ b/src/lint/linter/ArcanistXHPASTLinter.php
@@ -426,7 +426,7 @@
}
$span = $conditional
- ->getChildOfType(1, 'n_STATEMENT_LIST')
+ ->getChildByIndex(1)
->getTokens();
$whitelist[$type][$symbol_name][] = range(
diff --git a/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test b/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test
--- a/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test
+++ b/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test
@@ -12,6 +12,9 @@
new DateTimeImmutable();
}
+if (function_exists('json_last_error_msg'))
+ json_last_error_msg();
+
// These shouldn't fatal.
if (SomeClass::someStaticMethod($param)) {}
$var = 'some_func';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 6, 5:19 AM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7229879
Default Alt Text
D10551.id.diff (918 B)
Attached To
Mode
D10551: Fix a fatal error in `ArcanistXHPASTLinter`
Attached
Detach File
Event Timeline
Log In to Comment