projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
fc074c6
)
fix assertion fail on zend_hash_quick_update
author
Michael Wallner
<mike@php.net>
Wed, 16 Apr 2014 18:06:50 +0000
(20:06 +0200)
committer
Michael Wallner
<mike@php.net>
Wed, 16 Apr 2014 18:06:50 +0000
(20:06 +0200)
php_http_env_request.c
patch
|
blob
|
history
diff --git
a/php_http_env_request.c
b/php_http_env_request.c
index f2b8bf20fe36bec862cb4d531cdece047d69f9fd..6aff0c00fe0d106fba418841e061efc02bb7778d 100644
(file)
--- a/
php_http_env_request.c
+++ b/
php_http_env_request.c
@@
-96,7
+96,11
@@
static int grab_files(void *zpp TSRMLS_DC, int argc, va_list argv, zend_hash_key
add_assoc_zval_ex(cpy, ZEND_STRS("file"), *tmp);
zend_hash_del_key_or_index(Z_ARRVAL_P(cpy), ZEND_STRS("tmp_name"), 0, HASH_DEL_KEY);
}
add_assoc_zval_ex(cpy, ZEND_STRS("file"), *tmp);
zend_hash_del_key_or_index(Z_ARRVAL_P(cpy), ZEND_STRS("tmp_name"), 0, HASH_DEL_KEY);
}
- zend_hash_quick_update(Z_ARRVAL_P(zfiles), key->arKey, key->nKeyLength, key->h, (void *) &cpy, sizeof(zval *), NULL);
+ if (key->nKeyLength > 0) {
+ zend_hash_quick_update(Z_ARRVAL_P(zfiles), key->arKey, key->nKeyLength, key->h, (void *) &cpy, sizeof(zval *), NULL);
+ } else {
+ zend_hash_index_update(Z_ARRVAL_P(zfiles), key->h, (void *) &cpy, sizeof(zval *), NULL);
+ }
}
}
}
}