From 1e6019dddeefb8fad7017df3503f1b0ad0e37a9e Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Mon, 10 Oct 2022 16:18:27 +0200 Subject: [PATCH] size and error in $_FILES more specific --- .../Statements/Expression/Fetch/VariableFetchAnalyzer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php index 3fc1b8c7b9f..ae2bac6ac40 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php @@ -746,7 +746,7 @@ public static function getGlobalType(string $var_id, int $codebase_analysis_php_ new TNonEmptyList(Type::getString()), ]), 'size' => new Union([ - new TInt(), + new TIntRange(0, null), new TNonEmptyList(Type::getInt()), ]), 'tmp_name' => new Union([ @@ -754,7 +754,7 @@ public static function getGlobalType(string $var_id, int $codebase_analysis_php_ new TNonEmptyList(Type::getString()), ]), 'error' => new Union([ - new TInt(), + new TIntRange(0, 8), new TNonEmptyList(Type::getInt()), ]), ];