From aa2282df21b32f9a2a1e86b580cb4fca5ff2c3f5 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 17 Mar 2017 15:36:24 -0700 Subject: Allow JSON_OBJECT_AS_ARRAY option to actually have meaning Options can only be passed if $assoc is passed, but passing assoc clobbers any attempt to pass JSON_OBJECT_AS_ARRAY as an option. Allow the option to occur in the options field by handling "null" as default/use-options. --- ext/json/tests/bug73991.phpt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ext/json/tests/bug73991.phpt (limited to 'ext/json/tests') diff --git a/ext/json/tests/bug73991.phpt b/ext/json/tests/bug73991.phpt new file mode 100644 index 0000000000..06aba555f0 --- /dev/null +++ b/ext/json/tests/bug73991.phpt @@ -0,0 +1,28 @@ +--TEST-- +Allow JSON_OBJECT_AS_ARRAY to have an effect +--FILE-- + + string(3) "bar" +} +array(1) { + ["foo"]=> + string(3) "bar" +} +object(stdClass)#%d (1) { + ["foo"]=> + string(3) "bar" +} +array(1) { + ["foo"]=> + string(3) "bar" +} -- cgit v1.2.1