summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-10-18 17:35:29 +0800
committerXinchen Hui <laruence@php.net>2012-10-18 17:35:29 +0800
commit4eece4c86a74e18b916a4c052eb72c1977732828 (patch)
tree859af8c1153ffbaa91b94c2a9fe078986eb03d8e /ext/pcre/php_pcre.c
parentb77873f7d2c2fcb6a66133bc90e96304e7c362cb (diff)
parent54cef2bb6d4d0527ac161b900b0b475d2ce312fb (diff)
downloadphp-git-4eece4c86a74e18b916a4c052eb72c1977732828.tar.gz
Merge branch 'PHP-5.4'
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 6d393a26a7..2d23737c74 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -555,8 +555,9 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
/* Overwrite the passed-in value for subpatterns with an empty array. */
if (subpats != NULL) {
- zval_dtor(subpats);
+ zval garbage = *subpats;
array_init(subpats);
+ zval_dtor(&garbage);
}
subpats_order = global ? PREG_PATTERN_ORDER : 0;