Skip to content

Commit

Permalink
Ignore nullrefs when using echo
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Dec 9, 2016
1 parent ee2a604 commit eff98bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Checker/Statements/Expression/CallChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ public static function checkFunctionArgumentType(
return null;
}

if ($input_type->isNullable() && !$param_type->isNullable()) {
if ($input_type->isNullable() && !$param_type->isNullable() && $cased_method_id !== 'echo') {
if (IssueBuffer::accepts(
new NullReference(
'Argument ' . ($argument_offset + 1) . ' of ' . $cased_method_id . ' cannot be null, possibly ' .
Expand Down

0 comments on commit eff98bf

Please sign in to comment.