diff options
author | Xinchen Hui <laruence@gmail.com> | 2014-03-16 08:45:43 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2014-03-16 08:45:43 +0800 |
commit | 412ca11eda7f15415f1bca0cf72e15f125ce404d (patch) | |
tree | 19f264077a916895baec408c8758f736de39d3fc | |
parent | ef1e006bd67065641726f6ee2a9bd72196eb3125 (diff) | |
download | php-git-412ca11eda7f15415f1bca0cf72e15f125ce404d.tar.gz |
Fixed reference arg hanlding in pcre_replace
-rw-r--r-- | ext/pcre/php_pcre.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3c60a6a3e4..969fce2e9e 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1392,6 +1392,9 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_repl } } if (ZEND_NUM_ARGS() > 4) { + if (Z_ISREF_P(zcount)) { + zcount = Z_REFVAL_P(zcount); + } zval_dtor(zcount); ZVAL_LONG(zcount, replace_count); } |