From 7640b006350b0f7731e47100c8d5f8f9981c2ab3 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Mon, 9 Apr 2018 18:49:11 -0400 Subject: [PATCH] Only check functionlike arguments match if we know params --- .../Statements/Expression/Call/FunctionCallChecker.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Checker/Statements/Expression/Call/FunctionCallChecker.php b/src/Psalm/Checker/Statements/Expression/Call/FunctionCallChecker.php index e5f16a053..5b01916cd 100644 --- a/src/Psalm/Checker/Statements/Expression/Call/FunctionCallChecker.php +++ b/src/Psalm/Checker/Statements/Expression/Call/FunctionCallChecker.php @@ -270,11 +270,12 @@ class FunctionCallChecker extends \Psalm\Checker\Statements\Expression\CallCheck } // do this here to allow closure param checks - if (self::checkFunctionLikeArgumentsMatch( + if ($function_params !== null + && self::checkFunctionLikeArgumentsMatch( $statements_checker, $stmt->args, $function_id, - $function_params ?: [], + $function_params, $function_storage, null, $generic_params,