com php-src: Fixed reference arg hanlding in pcre_replace: ext/pcre/php_pcre.c

From: Date: Sun, 16 Mar 2014 00:45:43 +0000
Subject: com php-src: Fixed reference arg hanlding in pcre_replace: ext/pcre/php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77613@lists.php.net to get a copy of this message
Commit: 412ca11eda7f15415f1bca0cf72e15f125ce404d Author: Xinchen Hui <laruence@gmail.com> Sun, 16 Mar 2014 08:45:43 +0800 Parents: ef1e006bd67065641726f6ee2a9bd72196eb3125 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=412ca11eda7f15415f1bca0cf72e15f125ce404d Log: Fixed reference arg hanlding in pcre_replace Changed paths: M ext/pcre/php_pcre.c Diff: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3c60a6a..969fce2 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); }

« previous php.cvs (#77613) next »