Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update return types for get_headers and get_meta_tags #6206

Merged
merged 1 commit into from
Jul 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions stubs/CoreGenericFunctions.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -1266,16 +1266,20 @@ function base64_encode(string $data) : string {}
*
* @param resource|null $context
*
* @return ($format is 0 ? list<string> : array<string, string|list<string>>)|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<lowercase-string, string>|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<string,int|string|float|bool|null|array|resource> : array<string, array<string,int|string|float|bool|null|array|resource>>)
Expand Down