diff options
author | Jakub Zelenka <bukka@php.net> | 2015-06-28 17:16:12 +0100 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2015-06-28 17:16:12 +0100 |
commit | 64c371142cbdb82eb0879d247430797d73a8ac2d (patch) | |
tree | 280612b73745c40b0c838f2b8797eac712b72367 /ext/json/tests | |
parent | 695b4f4cad83c90f928af8a1c227defd5c6ca63c (diff) | |
download | php-git-64c371142cbdb82eb0879d247430797d73a8ac2d.tar.gz |
Fix bug #62010 (json_decode produces invalid byte-sequences)
Diffstat (limited to 'ext/json/tests')
-rw-r--r-- | ext/json/tests/bug62010.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/json/tests/bug62010.phpt b/ext/json/tests/bug62010.phpt new file mode 100644 index 0000000000..ddac8963c3 --- /dev/null +++ b/ext/json/tests/bug62010.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #62010 (json_decode produces invalid byte-sequences) +--SKIPIF-- +<?php if (!extension_loaded("json")) print "skip"; ?> +--FILE-- +<?php + +var_dump(json_decode('"\ud834"')); +var_dump(json_last_error() === JSON_ERROR_UTF16); +var_dump(json_last_error_msg()); +?> +--EXPECTF-- +NULL +bool(true) +string(50) "Single unpaired UTF-16 surrogate in unicode escape" |