1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

fix printf bug

This commit is contained in:
kkmuffme 2023-06-12 18:25:38 +02:00
parent 68559b1324
commit f2168de96e

View File

@ -63,7 +63,7 @@ class SprintfReturnTypeProvider implements FunctionReturnTypeProviderInterface
$node_type_provider = $statements_source->getNodeTypeProvider();
foreach ($call_args as $index => $call_arg) {
$type = $node_type_provider->getType($call_arg->value);
if ($type === null && $event->getFunctionId() === 'printf') {
if ($type === null && $index === 0 && $event->getFunctionId() === 'printf') {
break;
}