From 474343657614a2e6b2b036043fd122bbef768059 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sun, 26 Jul 2009 07:21:02 +0000 Subject: [PATCH] Fix 2 broken json tests. json_decode() returns a binary string, not unicode for efficiency, and if you are going to test invalid utf8 in a test, you have to stuff it into a binary string or it will be valid unicode by definition. --- ext/json/tests/bug42785.phpt | 4 ++-- ext/json/tests/bug43941.phpt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/json/tests/bug42785.phpt b/ext/json/tests/bug42785.phpt index b3df2fbb28..18646b8809 100644 --- a/ext/json/tests/bug42785.phpt +++ b/ext/json/tests/bug42785.phpt @@ -23,5 +23,5 @@ var_dump(json_encode($bar1)); ?> --EXPECTF-- Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d -unicode(13) "[100.1,"bar"]" -unicode(21) "{"a":100.1,"b":"foo"}" +string(13) "[100.1,"bar"]" +string(21) "{"a":100.1,"b":"foo"}" diff --git a/ext/json/tests/bug43941.phpt b/ext/json/tests/bug43941.phpt index 7cabdaf4a9..049c207654 100644 --- a/ext/json/tests/bug43941.phpt +++ b/ext/json/tests/bug43941.phpt @@ -5,10 +5,10 @@ Bug #43941 (json_encode() invalid UTF-8) --FILE-- -- 2.40.0