From 10c7f2ddbc98dec21e3060fc4c9319465438c9a9 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 6 Mar 2014 23:39:34 +0800 Subject: Fixed IS_REFERENCE handling in preg_match --- ext/pcre/php_pcre.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/pcre/php_pcre.c') 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); } -- cgit v1.2.1