mirror of
https://github.com/php/php-src.git
synced 2025-08-20 17:34:35 +02:00
fix #38981 (using FTP URLs in get_headers() causes crash)
This commit is contained in:
parent
e6ebe4dab3
commit
a005d97eeb
1 changed files with 5 additions and 0 deletions
|
@ -675,6 +675,11 @@ PHP_FUNCTION(get_headers)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!stream->wrapperdata || Z_TYPE_P(stream->wrapperdata) != IS_ARRAY) {
|
||||||
|
php_stream_close(stream);
|
||||||
|
RETURN_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
array_init(return_value);
|
array_init(return_value);
|
||||||
|
|
||||||
/* check for curl-wrappers that provide headers via a special "headers" element */
|
/* check for curl-wrappers that provide headers via a special "headers" element */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue