diff options
Diffstat (limited to 'main/rfc1867.c')
-rw-r--r-- | main/rfc1867.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c index 58617d4f6d..a1ba99f08c 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -769,7 +769,10 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ zend_hash_init(uploaded_files, 8, NULL, free_filename, 0); SG(rfc1867_uploaded_files) = uploaded_files; - array_init(&PG(http_globals)[TRACK_VARS_FILES]); + if (Z_TYPE(PG(http_globals)[TRACK_VARS_FILES]) != IS_ARRAY) { + /* php_auto_globals_create_files() might have already done that */ + array_init(&PG(http_globals)[TRACK_VARS_FILES]); + } zend_llist_init(&header, sizeof(mime_header_entry), (llist_dtor_func_t) php_free_hdr_entry, 0); |