com php-src: Fixed str_replace count handling: ext/st andard/string.c

From: Date: Sun, 02 Mar 2014 14:07:32 +0000
Subject: com php-src: Fixed str_replace count handling: ext/st andard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77831@lists.php.net to get a copy of this message
Commit: 92eda10261edf38d53c0134a1ef60aaaeb0755c6 Author: Xinchen Hui <laruence@gmail.com> Sun, 2 Mar 2014 22:07:32 +0800 Parents: 6ed82f71046768e42302539d7ff206cfaff87631 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=92eda10261edf38d53c0134a1ef60aaaeb0755c6 Log: Fixed str_replace count handling Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index d484eed..37a3512 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3950,8 +3950,8 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit php_str_replace_in_subject(search, replace, subject, return_value, case_sensitivity, (argc > 3) ? &count : NULL); } if (argc > 3) { - zval_dtor(zcount); - ZVAL_LONG(zcount, count); + zval_dtor(Z_REFVAL_P(zcount)); + ZVAL_LONG(Z_REFVAL_P(zcount), count); } } /* }}} */

« previous php.cvs (#77831) next »