1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

128 Commits

Author SHA1 Message Date
Xinchen Hui ed0eb2bfdd Merge branch 'PHP-7.0'
* PHP-7.0:
  Revert "Fixed bug #72170 (JsonSerializable may inc apply count without dec it)"
2016-05-06 20:25:43 +08:00
Xinchen Hui 197470b62f Revert "Fixed bug #72170 (JsonSerializable may inc apply count without dec it)"
This reverts commit 459a7cc209.
2016-05-06 20:25:24 +08:00
Xinchen Hui 10f8ca9151 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72170 (JsonSerializable may inc apply count without dec it)
2016-05-06 18:39:18 +08:00
Xinchen Hui 459a7cc209 Fixed bug #72170 (JsonSerializable may inc apply count without dec it)
I don't want use zend_try here, but seems I have no choice :<
2016-05-06 18:38:26 +08: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
Xinchen Hui 3f3180e35f Merge branch 'PHP-7.0'
* PHP-7.0:
  Update test script
2016-03-22 11:28:45 +08:00
Xinchen Hui b49ec68134 Update test script 2016-03-22 11:28:19 +08:00
Xinchen Hui 1e5ac8940a Merge branch 'PHP-7.0'
* PHP-7.0:
  Fix bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)
2016-03-21 16:22:02 +08:00
Jakub Zelenka 7e069daa89 Fix bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable) 2016-03-20 15:56:27 +00: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
Jakub Zelenka 3c32019989 Merge branch 'PHP-5.6' into PHP-7.0 2015-11-15 19:13:49 +00:00
Jakub Zelenka e5abc53701 Use the same CS for all json tests 2015-11-15 19:06:09 +00:00
Kubo2 f18ba0f9c9 Add tests for json_last_error()/json_last_error_msg() failures 2015-07-21 01:50:40 +02:00
Christoph M. Becker 22767a48a7 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add tests for json_last_error()/json_last_error_msg() failures
2015-07-21 02:00:16 +02:00
Jakub Zelenka f30503ce4e Fix incompatible JSON errors
This fixes differences in error codes with PHP 5 and 7.
The malformed UTF-8 and control character error codes are
now returned even in non-string context which makes it
the same as it was in PHP 5 json ext.
2015-06-28 18:09:10 +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
Hugo Fonseca baece85399 Added test for bug 69187 2015-03-07 10:53:31 +00:00
Jakub Zelenka ad2b751985 Merge branch 'PHP-5.6'
The fix for master is a bit different (it's fixed in encoder)
2015-02-22 20:54:05 +00: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
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 c3cd2d33ca Fix invalid test for bug 54484 2015-02-02 20:53:27 +00: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
Stanislav Malyshev 7f95aa4d97 Fix bug #68817: Null pointer deference 2015-01-14 16:12:35 -08:00
Juan Basso 95cef47afb Porting implementation of RFC json_preserve_fractional_part 2015-01-12 21:29:52 -05:00
Jakub Zelenka 0bfa245aa3 Modify json/tests/pass003 to ignore internal object ID
Child is now created first - bottom up parsing (LR)
2014-12-12 20:00:08 +00:00
Nikita Popov b30c7fe263 Port JSON 2014-05-05 01:00:59 +02:00
Stanislav Malyshev 7c9209a0d1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix #66021 (Blank line inside empty array/object)
2014-04-13 18:56:16 -07:00
Stanislav Malyshev 9bba219c75 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix #66021 (Blank line inside empty array/object)
2014-04-13 18:55:28 -07:00
Stanislav Malyshev 5e66ce9293 Merge branch 'pull-request/518' into PHP-5.4
* pull-request/518:
  Fix #66021 (Blank line inside empty array/object)
2014-04-13 18:50:39 -07:00
Andrea Faulds 91779db95b Fixed case part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly") 2013-11-11 22:54:16 +00:00
Adam Harvey 304bff90f4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS and remove the unnecessary UPGRADING note.
  UPGRADING and NEWS
  Better test: Check combined leading/trailing
  Fixed whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly")
2013-11-10 16:11:28 -05:00
Kevin Israel 82a4f1a1a2 Fix #66021 (Blank line inside empty array/object)
Changed json_encode() so that when the JSON_PRETTY_PRINT option is specified,
the pair of linefeeds immediately after an opening bracket and before the
corresponding closing bracket is omitted when the array or object contains no
elements or accessible properties (and hence would have a blank line between
the brackets).
2013-11-02 15:59:11 -04:00
Andrea Faulds 8495d63034 Better test: Check combined leading/trailing 2013-10-15 20:42:31 +00:00
Andrea Faulds 2524428504 Fixed whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly") 2013-09-17 19:09:52 +00:00
Adam Harvey 8bb106d20c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Alter php_json_decode_ex() to respect JSON_BIGINT_AS_STRING for bare numbers.
2012-12-11 19:53:02 +08:00
Adam Harvey 2d1694d4eb Alter php_json_decode_ex() to respect JSON_BIGINT_AS_STRING for bare numbers.
Fixes bug #63737 (json_decode does not properly decode with options parameter).
2012-12-11 19:51:30 +08:00
Nikita Popov f3192ea6e4 Fix 64bit JSON test 2012-08-13 18:43:03 +02:00
Xinchen Hui f8559194db Fix test failed due to new feature introduced in 45d596ea 2012-07-29 23:35:06 +08:00
Florian Anderiasch 45d596ea1e Add optional depth parameter to json_encode #62369 2012-07-24 13:15:16 +02:00
Nikita Popov b7903f9778 Revert JSON merges to 5.4
This reverts the following merge commits (-m 1):

405ebfcd18
d372b33c9b
36fa17a5fa
2012-07-01 16:38:26 +02:00