Fix: json_post.flags=2 ignored with php7
authorRemi Collet <fedora@famillecollet.com>
Fri, 24 Jul 2015 07:57:36 +0000 (09:57 +0200)
committerRemi Collet <fedora@famillecollet.com>
Fri, 24 Jul 2015 07:57:36 +0000 (09:57 +0200)
Detected on 32bits build, where 003.phpt is failing
(not detected on 64bits, because not covered)

package.xml
php_json_post.c

index 22f0d5794391fe359868702173777dfbec978f8f..dff97b9e0a5f43c1673b3da6ee948778eaae8b82 100644 (file)
@@ -51,6 +51,7 @@ This extension does not provide any constants, functions or classes.
      <file role="test" name="001.phpt"/>
      <file role="test" name="002.phpt"/>
      <file role="test" name="003.phpt"/>
+     <file role="test" name="004.phpt"/>
      <file role="test" name="application.phpt"/>
    </dir>
   </dir>
index fd3165cf182633176106d64f8ee5603db69f8154..4a0fcd30387a1d9346461aa53343e017a2e6e76b 100644 (file)
@@ -63,7 +63,7 @@ static SAPI_POST_HANDLER_FUNC(php_json_post_handler)
 
                        ZVAL_NULL(&tmp);
 
-                       php_json_decode(&tmp, json->val, json->len, JSON_POST_G(flags), PG(max_input_nesting_level));
+                       php_json_decode_ex(&tmp, json->val, json->len, JSON_POST_G(flags), PG(max_input_nesting_level));
 
                        switch (Z_TYPE(tmp)) {
                        case IS_OBJECT: