diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2017-10-01 11:27:16 +0200 |
---|---|---|
committer | Fabien Villepinte <fabien.villepinte@gmail.com> | 2017-10-01 11:27:16 +0200 |
commit | 9d9873b3b5f6f6dcdbe7d4e981c1b5eda6d7da56 (patch) | |
tree | 48df058ffbc500aa16940bc89f6d4c3eadc0e845 /ext/zlib | |
parent | abefb6dfe76c57803e49969185183c2b4ef9352e (diff) | |
download | php-git-9d9873b3b5f6f6dcdbe7d4e981c1b5eda6d7da56.tar.gz |
Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/tests/bug75299.phpt | 20 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 6 |
2 files changed, 24 insertions, 2 deletions
diff --git a/ext/zlib/tests/bug75299.phpt b/ext/zlib/tests/bug75299.phpt new file mode 100644 index 0000000000..1886b3ecaf --- /dev/null +++ b/ext/zlib/tests/bug75299.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #75299 Wrong reflection on inflate_init and inflate_add +--SKIPIF-- +<?php if (!extension_loaded("zlib") || !extension_loaded('reflection')) die("skip"); ?> +--FILE-- +<?php +$r = new ReflectionFunction('inflate_init'); +var_dump($r->getNumberOfRequiredParameters()); +var_dump($r->getNumberOfParameters()); +$r = new ReflectionFunction('inflate_add'); +var_dump($r->getNumberOfRequiredParameters()); +var_dump($r->getNumberOfParameters()); +?> +===DONE=== +--EXPECT-- +int(1) +int(2) +int(2) +int(3) +===DONE=== diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index b3c1a88fc5..6f2519d00f 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1315,11 +1315,13 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_inflate_init, 0, 0, 1) ZEND_ARG_INFO(0, encoding) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_inflate_add, 0, 0, 2) - ZEND_ARG_INFO(0, resource) - ZEND_ARG_INFO(0, flush_behavior) + ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO(0, encoded_data) + ZEND_ARG_INFO(0, flush_mode) ZEND_END_ARG_INFO() /* }}} */ |