diff options
| author | Florian MARGAINE <florian@margaine.com> | 2014-09-20 10:09:21 +0200 |
|---|---|---|
| committer | Florian MARGAINE <florian@margaine.com> | 2014-09-20 10:09:21 +0200 |
| commit | 8eb7e7bf7f63f49e97f112871df47c6d6213e715 (patch) | |
| tree | 24b9059118cf6abb5fe0837eaa477b4668b18435 /ext/json/json.c | |
| parent | 58ed832fc99d5c5aeac7849819bbc4e0dc90d698 (diff) | |
| parent | 95836a350420cabc2e8e5f5c45131fba46504a3b (diff) | |
| download | php-git-8eb7e7bf7f63f49e97f112871df47c6d6213e715.tar.gz | |
Merge branch 'master' into issue-67910
Conflicts:
README.PARAMETER_PARSING_API
ext/gmp/tests/001.phpt
Diffstat (limited to 'ext/json/json.c')
| -rw-r--r-- | ext/json/json.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/json/json.c b/ext/json/json.c index 24324bbe99..485d14d11b 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ @@ -384,7 +384,7 @@ static void json_escape_string(smart_str *buf, char *s, size_t len, int options { int status; unsigned int us, next_us = 0; - size_t pos, checkpoint, newlen; + size_t pos, checkpoint; if (len == 0) { smart_str_appendl(buf, "\"\"", 2); @@ -789,7 +789,7 @@ static PHP_FUNCTION(json_encode) ZVAL_FALSE(return_value); } else { smart_str_0(&buf); /* copy? */ - ZVAL_STR(return_value, buf.s); + ZVAL_NEW_STR(return_value, buf.s); } } /* }}} */ |
