diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-11-03 00:34:18 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-11-03 00:34:18 +0300 |
commit | 95b33f239447df2f029259bfefcbe5e05dbedf2f (patch) | |
tree | bfa31b982b1a5b476a982382a9e4adc8b45a6019 /main/SAPI.c | |
parent | d92a701a3bb99fe8dbaa341589c2fc1e5010a6b8 (diff) | |
download | php-git-95b33f239447df2f029259bfefcbe5e05dbedf2f.tar.gz |
Added RC_DEBUG exception
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index c841c6e789..c66be1a19b 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -948,12 +948,17 @@ SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entries) SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry) { + int ret; + zend_string *key; if (SG(sapi_started) && EG(current_execute_data)) { return FAILURE; } - return zend_hash_str_add_mem(&SG(known_post_content_types), - post_entry->content_type, post_entry->content_type_len, + key = zend_string_init(post_entry->content_type, post_entry->content_type_len, 1); + GC_MAKE_PERSISTENT_LOCAL(key); + ret = zend_hash_add_mem(&SG(known_post_content_types), key, (void *) post_entry, sizeof(sapi_post_entry)) ? SUCCESS : FAILURE; + zend_string_release(key); + return ret; } SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry) |