let JSON be decoded as array unless fetch_type is FETCH_OBJECT
[m6w6/ext-pq] / tests / conv001.phpt
index 7e778e99479e7c286fb2781b43a9de673e5d2225..6e794aa6af7896c122d299b18893553053848176 100644 (file)
@@ -3,6 +3,7 @@ converter
 --SKIPIF--
 <?php
 include "_skipif.inc";
+_ext("json");
 ?>
 --INI--
 date.timezone=UTC
@@ -69,7 +70,7 @@ class JSONConverter extends Converter
        }
        
        function convertFromString($string, $type) {
-               return json_decode($string);
+               return json_decode($string, true);
        }
        
        function convertToString($data, $type) {
@@ -208,11 +209,11 @@ array(1) {
       int(1343423)
     }
     [3]=>
-    object(stdClass)#%d (3) {
+    array(3) {
       ["int"]=>
       int(123)
       ["obj"]=>
-      object(stdClass)#%d (3) {
+      array(3) {
         ["a"]=>
         int(1)
         ["b"]=>