Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14079824
D12134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12134.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
@@ -3107,7 +3107,7 @@
$nodes = $root->selectDescendantsOfType('n_CALL_PARAMETER_LIST');
foreach ($nodes as $node) {
- $parameters = $node->selectDescendantsOfType('n_VARIABLE_REFERENCE');
+ $parameters = $node->getChildrenOfType('n_VARIABLE_REFERENCE');
foreach ($parameters as $parameter) {
$this->raiseLintAtNode(
diff --git a/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test b/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test
--- a/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test
+++ b/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test
@@ -20,6 +20,9 @@
sprintf('0%o', 0777 & $p);
$foo(&$myvar);
+
+array_walk(array(), function() use (&$x) {});
+MyClass::myfunc(array(&$x, &$y));
~~~~~~~~~~
error:2:7 XHP19
error:9:8
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 9:59 AM (17 h, 56 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6778166
Default Alt Text
D12134.diff (1 KB)
Attached To
Mode
D12134: Fix a few edge cases for call-time pass-by-reference linting
Attached
Detach File
Event Timeline
Log In to Comment