summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-06-13 18:20:37 -0700
committerXinchen Hui <laruence@gmail.com>2016-06-13 18:20:37 -0700
commit14e790a0753dce4dfaeff1b2d8f9800b519917c1 (patch)
tree841db98cc545ad989618166d969c19bef315cb47 /ext/mbstring/php_mbregex.c
parent78a13e8290a694c6857e0a67f265127f388065d0 (diff)
parent3d5641872239cbd4ec8855b05c90f94fb0d11d7e (diff)
downloadphp-git-14e790a0753dce4dfaeff1b2d8f9800b519917c1.tar.gz
Merge branch 'PHP-7.0'
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 457ee2ff08..b49b4e9332 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -459,8 +459,12 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
retval = NULL;
goto out;
}
+ if (rc == MBREX(search_re)) {
+ /* reuse the new rc? see bug #72399 */
+ MBREX(search_re) = NULL;
+ }
zend_hash_str_update_ptr(&MBREX(ht_rc), (char *)pattern, patlen, retval);
- } else if (rc) {
+ } else {
retval = rc;
}
out: