From 6ed8a4d292057d67ec2df7a5bd28c7b7521199ad Mon Sep 17 00:00:00 2001 From: Jack Robertson Date: Thu, 29 Jul 2021 19:50:13 +0100 Subject: [PATCH] Update return types for get_headers and get_meta_tags --- stubs/CoreGenericFunctions.phpstub | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 96cf6ed51a7..436ac9f8cf2 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -1266,16 +1266,20 @@ function base64_encode(string $data) : string {} * * @param resource|null $context * + * @return ($format is 0 ? list : array>)|false + * * @psalm-taint-sink ssrf $url */ -function get_headers(string $url, int $format = 0, $context = null) : array {} +function get_headers(string $url, int $format = 0, $context = null) : array|false {} /** * @psalm-pure * + * @return array|false + * * @psalm-taint-sink ssrf $filename */ -function get_meta_tags(string $filename, bool $use_include_path = false) : array {} +function get_meta_tags(string $filename, bool $use_include_path = false) : array|false {} /** * @return ($categorize is false ? array : array>)