mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix taint regression
This commit is contained in:
parent
80ed1daf33
commit
8edee96d8d
@ -1243,18 +1243,22 @@ class StaticCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
|
||||
) {
|
||||
$code_location = new CodeLocation($statements_analyzer->getSource(), $stmt);
|
||||
|
||||
$method_location = $method_storage
|
||||
? ($method_storage->signature_return_type_location ?: $method_storage->location)
|
||||
: null;
|
||||
|
||||
if ($method_storage && $method_storage->pure) {
|
||||
$method_source = TaintNode::getForMethodReturn(
|
||||
(string) $method_id,
|
||||
$cased_method_id,
|
||||
$code_location,
|
||||
$method_location,
|
||||
$code_location
|
||||
);
|
||||
} else {
|
||||
$method_source = TaintNode::getForMethodReturn(
|
||||
(string) $method_id,
|
||||
$cased_method_id,
|
||||
$code_location
|
||||
$method_location
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user