From 6cd63cc0f36935ccc092165daff870870eb4df88 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sun, 30 Oct 2016 12:51:41 -0400 Subject: [PATCH] Fix nullref --- src/Psalm/Checker/Statements/ExpressionChecker.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Psalm/Checker/Statements/ExpressionChecker.php b/src/Psalm/Checker/Statements/ExpressionChecker.php index 4ac6fa02a..1b979abb1 100644 --- a/src/Psalm/Checker/Statements/ExpressionChecker.php +++ b/src/Psalm/Checker/Statements/ExpressionChecker.php @@ -2629,6 +2629,10 @@ class ExpressionChecker foreach ($closure_arg->params as $i => $closure_param) { + if (!$array_arg_types[$i]) { + continue; + } + $translated_param = FunctionLikeChecker::getTranslatedParam( $closure_param, $statements_checker->getAbsoluteClass(),