From: Xinchen Hui Date: Thu, 6 Mar 2014 15:39:34 +0000 (+0800) Subject: Fixed IS_REFERENCE handling in preg_match X-Git-Tag: POST_PHPNG_MERGE~412^2~386 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10c7f2ddbc98dec21e3060fc4c9319465438c9a9;p=php Fixed IS_REFERENCE handling in preg_match --- 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); }