diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-09-21 00:29:48 +0100 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-09-21 00:29:48 +0100 |
commit | 12b15e5ca4ae7ebf6e50551a4c666ece97068074 (patch) | |
tree | af4eaae6897444c3d8a987d59b695984a26d25d7 /ext/json | |
parent | 545c296ef4b5ffdb1cf59583c55129f08d75601b (diff) | |
parent | 6219a4e844e82f8eacd9ad6d24bb92739dcd6ff6 (diff) | |
download | php-git-12b15e5ca4ae7ebf6e50551a4c666ece97068074.tar.gz |
Merge branch 'master' into integer_semantics
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/json.c | 6 | ||||
-rw-r--r-- | ext/json/php_json.h | 2 |
2 files changed, 4 insertions, 4 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); } } /* }}} */ diff --git a/ext/json/php_json.h b/ext/json/php_json.h index 08a4a7ff94..05dcc43e06 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ |