summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-03-06 23:39:34 +0800
committerXinchen Hui <laruence@gmail.com>2014-03-06 23:39:34 +0800
commit10c7f2ddbc98dec21e3060fc4c9319465438c9a9 (patch)
treeac283a26706e43d393277dee4091b002b1974a1c /ext/pcre/php_pcre.c
parent2d45dce4aa3e00f5d0bf40cc19d81033c3ce08bc (diff)
downloadphp-git-10c7f2ddbc98dec21e3060fc4c9319465438c9a9.tar.gz
Fixed IS_REFERENCE handling in preg_match
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 0a62f6f0b2..83844b1455 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -539,6 +539,9 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ *
RETURN_FALSE;
}
+ if (subpats) {
+ subpats = Z_REFVAL_P(subpats);
+ }
php_pcre_match_impl(pce, subject, subject_len, return_value, subpats,
global, ZEND_NUM_ARGS() >= 4, flags, start_offset TSRMLS_CC);
}