1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 01:37:23 +01:00

fix 'Undefined offset: 1' in CodeBase::getTypeContextAtPosition issue (#6559)

This commit is contained in:
NikolayZhebet 2021-09-30 20:09:15 +03:00
parent 02ef33c4ac
commit 843f14d069

View File

@ -1466,7 +1466,7 @@ class Codebase
}
// First parameter to a function-like
$function_storage = $this->getFunctionStorageForSymbol($file_path, $function . '()');
if (!$function_storage || !$function_storage->params) {
if (!$function_storage || !$function_storage->params || !isset($function_storage->params[$argument_num])) {
return null;
}