summaryrefslogtreecommitdiff
path: root/ext/standard/url.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-09-28 12:55:15 (GMT)
committerAntony Dovgal <tony2001@php.net>2006-09-28 12:55:15 (GMT)
commit30a015a92f68387e3214c932392473205701089e (patch)
tree5eb0940bd46ce0885b6f9f26f9afe0d676c0a487 /ext/standard/url.c
parent40924a6f6ce7167c192b561fd0b9d8d6273414bd (diff)
downloadphp-30a015a92f68387e3214c932392473205701089e.tar.gz
MFH: fix #38981 (using FTP URLs in get_headers() causes crash)
Diffstat (limited to 'ext/standard/url.c')
-rw-r--r--ext/standard/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 77e9da1..0a4bae9 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -675,6 +675,11 @@ PHP_FUNCTION(get_headers)
RETURN_FALSE;
}
+ if (!stream->wrapperdata || Z_TYPE_P(stream->wrapperdata) != IS_ARRAY) {
+ php_stream_close(stream);
+ RETURN_FALSE;
+ }
+
array_init(return_value);
/* check for curl-wrappers that provide headers via a special "headers" element */