Skip to content

Commit

Permalink
Fix crash when data_flow_graph is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrolGenhald committed Feb 17, 2022
1 parent 580278d commit 8f710cc
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -988,7 +988,8 @@ public static function analyzeAssignmentRef(

$context->vars_in_scope[$lhs_var_id]->parent_nodes[$lhs_node->id] = $lhs_node;

if (($stmt->var instanceof ArrayDimFetch || $stmt->var instanceof PropertyFetch)
if ($statements_analyzer->data_flow_graph !== null
&& ($stmt->var instanceof ArrayDimFetch || $stmt->var instanceof PropertyFetch)
&& $stmt->var->var instanceof Variable
&& is_string($stmt->var->var->name)
) {
Expand Down

0 comments on commit 8f710cc

Please sign in to comment.