diff options
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 9c39bf8324..e4480d468c 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1017,11 +1017,10 @@ PHP_FUNCTION(preg_replace) (void **)&subject_entry) == SUCCESS) { if ((result = php_replace_in_subject(*regex, *replace, subject_entry, &result_len, limit_val)) != NULL) { /* Add to return array */ - switch(zend_hash_get_current_key((*subject)->value.ht, &string_key, &num_key)) + switch(zend_hash_get_current_key((*subject)->value.ht, &string_key, &num_key, 0)) { case HASH_KEY_IS_STRING: add_assoc_stringl(return_value, string_key, result, result_len, 0); - efree(string_key); break; case HASH_KEY_IS_LONG: @@ -1314,12 +1313,11 @@ PHP_FUNCTION(preg_grep) (*entry)->refcount++; /* Add to return array */ - switch(zend_hash_get_current_key((*input)->value.ht, &string_key, &num_key)) + switch(zend_hash_get_current_key((*input)->value.ht, &string_key, &num_key, 0)) { case HASH_KEY_IS_STRING: zend_hash_update(return_value->value.ht, string_key, strlen(string_key)+1, entry, sizeof(zval *), NULL); - efree(string_key); break; case HASH_KEY_IS_LONG: |