1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Don’t taint foreach keys with array-fetch

We could use array-keyfetch or similar, but for now gives false-positives
This commit is contained in:
Matt Brown 2020-11-19 19:08:42 -05:00 committed by Daniil Gentili
parent 5afbf5f831
commit 84348ec38d
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -448,14 +448,6 @@ class ForeachAnalyzer
$key_type = Type::combineUnionTypes($key_type, $key_type_part);
}
ArrayFetchAnalyzer::taintArrayFetch(
$statements_analyzer,
$stmt->expr,
null,
$key_type,
Type::getMixed()
);
$has_valid_iterator = true;
continue;
}