Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Dec 11, 2019
1 parent 848cbbb commit c27d0d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Psalm/Internal/Analyzer/TypeAnalyzer.php
Expand Up @@ -1865,7 +1865,7 @@ private static function isMatchingTypeContainedBy(
$replacement_templates = []; $replacement_templates = [];


if ($input_template_types) { if ($input_template_types) {
foreach ($input_template_types as $template_name => $template_type_map) { foreach ($input_template_types as $template_name => $_) {
if (!isset($input_type_params[$i])) { if (!isset($input_type_params[$i])) {
break; break;
} }
Expand Down Expand Up @@ -1918,9 +1918,11 @@ private static function isMatchingTypeContainedBy(
} }
} }


$new_input_param->replaceTemplateTypesWithArgTypes( if ($new_input_param) {
$replacement_templates $new_input_param->replaceTemplateTypesWithArgTypes(
); $replacement_templates
);
}


$new_input_params[] = $new_input_param ?: Type::getMixed(); $new_input_params[] = $new_input_param ?: Type::getMixed();
} }
Expand Down

0 comments on commit c27d0d9

Please sign in to comment.