New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parse_str() might return arrays by-ref #1994
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -700,4 +700,15 @@ public function testBug6243(): void | |
$this->analyse([__DIR__ . '/data/bug-6243.php'], []); | ||
} | ||
|
||
public function testBug8356(): void | ||
{ | ||
$this->bleedingEdge = true; | ||
$this->analyse([__DIR__ . '/data/bug-8356.php'], [ | ||
[ | ||
"Offset 'x' might not exist on array|string.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. before this PR, the rule reported when running this test without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The bot only goes through triaged issues labeled as bug or feature-request. |
||
7, | ||
], | ||
]); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Bug8356; | ||
|
||
function foo(): void { | ||
parse_str('filter[x][y]=0', $output); | ||
print $output['filter']['x']['y']; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved
parse_str
andmb_parse_str
next to each other, and equalized the type signatures