1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 08:49:52 +01:00

Clone to prevent incorrect references

This commit is contained in:
Matt Brown 2020-11-10 09:01:46 -05:00
parent e27cbfba57
commit 81babf2430

View File

@ -1092,6 +1092,8 @@ class AssignmentAnalyzer
$data_flow_graph = $statements_analyzer->data_flow_graph;
if ($context->vars_in_scope[$var_id]->parent_nodes) {
$context->vars_in_scope[$var_id] = clone $context->vars_in_scope[$var_id];
if ($data_flow_graph instanceof TaintFlowGraph
&& \in_array('TaintedInput', $statements_analyzer->getSuppressedIssues())
) {