From 2e839246820f36da7eeadf37421457147393cf29 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 31 Oct 2017 10:43:10 +0300 Subject: Added zend_hash_add_new_mem/zend_hash_str_add_new_mem. Use them to add new elements into PCRE cache (we checked the existance before). --- ext/pcre/php_pcre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 44b5ff55b0..adedcd8d9f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -592,7 +592,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex) * See bug #63180 */ if (!ZSTR_IS_INTERNED(key) || !(GC_FLAGS(key) & IS_STR_PERMANENT)) { - pce = zend_hash_str_update_mem(&PCRE_G(pcre_cache), + pce = zend_hash_str_add_new_mem(&PCRE_G(pcre_cache), ZSTR_VAL(key), ZSTR_LEN(key), &new_entry, sizeof(pcre_cache_entry)); #if HAVE_SETLOCALE if (key != regex) { @@ -600,7 +600,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex) } #endif } else { - pce = zend_hash_update_mem(&PCRE_G(pcre_cache), key, &new_entry, sizeof(pcre_cache_entry)); + pce = zend_hash_add_new_mem(&PCRE_G(pcre_cache), key, &new_entry, sizeof(pcre_cache_entry)); } return pce; -- cgit v1.2.1