Commit graph

192 commits

Author SHA1 Message Date
Anatol Belski
d61db8d602 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  remove TSRMLS_*
2016-11-22 00:32:42 +01:00
Anatol Belski
5e9b4c26a5 remove TSRMLS_* 2016-11-21 23:53:37 +01:00
Jakub Zelenka
f284479734 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-20 20:38:34 +00:00
Jakub Zelenka
60574ea1ac Fix bug #73526 (php_json_encode depth issue) 2016-11-20 20:36:03 +00:00
Jakub Zelenka
c34de0b61c Introduce json encoder to fix globals related issues
It fixes bugs #66025 and #73254 by replacing globals with
a passed structure holding depth and error code. In addition
it fixes #72069 in a more generic way.
2016-10-30 13:20:10 +00:00
Julien Pauli
b41abf7496 Fix 73113 - Segfault with throwing JsonSerializable 2016-09-19 15:16:14 +02:00
Jakub Zelenka
12a8c3f6e7 Add initial failure checking for json_encode 2016-08-29 14:49:40 +01:00
Jakub Zelenka
37c12f8f86 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-14 14:01:36 +01:00
Jakub Zelenka
436d50a821 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-14 14:00:35 +01:00
Jakub Zelenka
9f1d962ed6 Fixed bug #72787 (json_decode reads out of bounds) 2016-08-14 13:52:59 +01:00
Jakub Zelenka
bea131f0bc Add return code from json API functions
It will allow fix few json bugs in a better way
2016-06-28 20:49:38 +01:00
Jakub Zelenka
3f13507dd2 Use one place to define max length of double
Introduce new constant PHP_DOUBLE_MAX_LENGTH for that purpose
2016-06-26 14:03:01 +01:00
Jakub Zelenka
75b86a2c22 Replace json.precision with serialize_precision 2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
3aa2aadcf0 Add JSON_G(precision) 2016-06-26 13:26:43 +01:00
Xinchen Hui
fa5f28a0a1 Merge branch 'PHP-7.0' 2016-04-22 21:41:52 -07:00
Xinchen Hui
589d0e0f18 Fixed bug #72069 (Behavior \JsonSerializable different from json_encode) 2016-04-22 21:41:44 -07:00
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Eddie Kohler
104876dd8e json_encode: Escape U+2028 and U+2029 more often.
These characters are illegal in Javascript, so leaving them unescaped
is risky. The default encoder ($flags = 0) is fine, but the encoder
with JSON_UNESCAPED_UNICODE flag is not.

In case anyone wants the ability to leave these characters unescaped,
provide JSON_UNESCAPED_LINE_TERMINATORS.
2016-01-22 19:40:58 +00:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Jakub Zelenka
539db00538 Simplify JSON constants registration 2015-09-04 20:00:29 +01:00
Jakub Zelenka
6e5574807f Add my name to authors for previous refactoring
Related to jsond changes
2015-09-04 19:56:59 +01:00
Joe Watkins
26e619b192 these need to be exported for extensions that use json 2015-09-03 19:28:34 +01:00
Jakub Zelenka
64c371142c Fix bug #62010 (json_decode produces invalid byte-sequences) 2015-06-28 17:16:12 +01:00
Jakub Zelenka
f3df3df873 Fix bug #68546 (json_decode cannot access property started with \0) 2015-06-21 15:30:33 +01:00
Jakub Zelenka
97d809a8a5 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/json/json.c
2015-02-22 20:35:03 +00:00
Jakub Zelenka
591dbcabe5 Fix bug #64695 (JSON_NUMERIC_CHECK has issues with strings that are numbers plus the letter e) 2015-02-22 20:22:47 +00:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Anatol Belski
ef2fd13de8 fix datatype mismatches 2015-02-09 11:06:02 +01:00
Julien Pauli
93315c4e1d Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Revert "json_decode() should generate a syntax error when given ""."
  Update NEWS
2015-02-04 12:48:57 +01:00
Julien Pauli
c85f12e3ac Revert "json_decode() should generate a syntax error when given ""."
This reverts commit a7b3abe4e6.
2015-02-04 12:48:17 +01:00
Jakub Zelenka
3e4c1717ee Merge branch 'master' into jsond 2015-02-02 19:53:32 +00:00
Adam Harvey
9e20b64a5b Merge branch 'PHP-5.6' 2015-02-02 11:12:27 +00:00
Adam Harvey
db375cfd4d Merge branch 'PHP-5.5' into PHP-5.6 2015-02-02 11:11:05 +00:00
Adam Harvey
a7b3abe4e6 json_decode() should generate a syntax error when given "".
Fixes bug #68938 (json_decode() decodes empty string without error).
Patch by jeremy at bat-country dot us.
2015-02-02 11:07:34 +00:00
Jakub Zelenka
3159d518d0 Merge branch 'master' into jsond
Conflicts:
	ext/json/JSON_parser.c
	ext/json/json.c
2015-01-25 18:43:15 +00:00
Stanislav Malyshev
1fdd558e39 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #50224 where float without decimals were converted to integer
  Updated NEWS for #68371
2015-01-19 10:05:57 -08:00
Juan Basso
ac7cfad3b5 Fixed bug #50224 where float without decimals were converted to integer 2015-01-19 00:46:02 -08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Juan Basso
95cef47afb Porting implementation of RFC json_preserve_fractional_part 2015-01-12 21:29:52 -05:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Jakub Zelenka
b68da91d52 Merge branch 'master' into jsond
Conflicts:
	ext/json/JSON_parser.c
	ext/json/JSON_parser.h
	ext/json/config.m4
	ext/json/config.w32
	ext/json/json.c
	ext/json/php_json.h
2014-12-27 19:42:04 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Jakub Zelenka
f18aae6042 Fix compilation for json_encoder 2014-11-30 17:47:17 +00:00
Jakub Zelenka
a4e59c39a7 Add missing bits to php_json.h 2014-11-25 20:36:41 +00:00
Jakub Zelenka
e18dd67975 Move json encoding stuff 2014-11-24 20:46:13 +00:00
Anatol Belski
fea10f6a5e ext/iconv, ext/json and ext/session use static tsrmls pointer 2014-10-17 14:16:40 +02:00