diff options
Diffstat (limited to 'ext/json/tests/bug54058.phpt')
-rw-r--r-- | ext/json/tests/bug54058.phpt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/json/tests/bug54058.phpt b/ext/json/tests/bug54058.phpt index 3b1136bdd9..df1b3130f8 100644 --- a/ext/json/tests/bug54058.phpt +++ b/ext/json/tests/bug54058.phpt @@ -8,28 +8,33 @@ Bug #54058 (json_last_error() invalid UTF-8 produces wrong error) $bad_utf8 = quoted_printable_decode('=B0'); json_encode($bad_utf8); -var_dump(json_last_error()); +var_dump(json_last_error(), json_last_error_msg()); $a = new stdclass; $a->foo = quoted_printable_decode('=B0'); json_encode($a); -var_dump(json_last_error()); +var_dump(json_last_error(), json_last_error_msg()); $b = new stdclass; $b->foo = $bad_utf8; $b->bar = 1; json_encode($b); -var_dump(json_last_error()); +var_dump(json_last_error(), json_last_error_msg()); $c = array( 'foo' => $bad_utf8, 'bar' => 1 ); json_encode($c); -var_dump(json_last_error()); +var_dump(json_last_error(), json_last_error_msg()); + ?> --EXPECTF-- int(5) +string(56) "Malformed UTF-8 characters, possibly incorrectly encoded" int(5) +string(56) "Malformed UTF-8 characters, possibly incorrectly encoded" int(5) +string(56) "Malformed UTF-8 characters, possibly incorrectly encoded" int(5) +string(56) "Malformed UTF-8 characters, possibly incorrectly encoded" |