com php-src: Fix Bug #75299 Wrong reflection on inflate_init and inflate_add: ext/zlib/tests/bug75299 .phpt ext/zlib/zlib.c
| From: | Christoph Michael Becker | Date: | Sun, 01 Oct 2017 09:27:16 +0000 |
| Subject: | com php-src: Fix Bug #75299 Wrong reflection on inflate_init and inflate_add: ext/zlib/tests/bug75299 .phpt ext/zlib/zlib.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99707@lists.php.net to get a copy of this message | ||
Commit: 9d9873b3b5f6f6dcdbe7d4e981c1b5eda6d7da56
Author: Fabien Villepinte <fabien.villepinte@gmail.com> Sun, 1 Oct 2017 11:27:16
+0200
Parents: abefb6dfe76c57803e49969185183c2b4ef9352e
Branches: PHP-7.0 PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9d9873b3b5f6f6dcdbe7d4e981c1b5eda6d7da56
Log:
Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
Bugs:
https://bugs.php.net/75299
Changed paths:
A ext/zlib/tests/bug75299.phpt
M ext/zlib/zlib.c
Diff:
diff --git a/ext/zlib/tests/bug75299.phpt b/ext/zlib/tests/bug75299.phpt
new file mode 100644
index 0000000..1886b3e
--- /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 b3c1a88..6f2519d 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()
/* }}} */