diff options
author | Joe Watkins <krakjoe@php.net> | 2017-10-27 16:06:38 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-10-27 16:06:57 +0100 |
commit | f2367d4626cb38365c668be0352ef36d88772a4b (patch) | |
tree | 4a312ff8a5328e0b8392ba69b968dd511a50c26b /ext | |
parent | cbf385e68ce947fbf3c709b39a7ff969e9d36e01 (diff) | |
parent | 14be7dcf8e0e41cc8580202fe4beaa4347229b0a (diff) | |
download | php-git-f2367d4626cb38365c668be0352ef36d88772a4b.tar.gz |
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
Fix bug #75307 Wrong reflection for openssl_open function
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/openssl.c | 9 | ||||
-rw-r--r-- | ext/openssl/tests/bug75307.phpt | 18 |
2 files changed, 23 insertions, 4 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index c740b5cda9..4abb11bf0c 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -364,17 +364,18 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_seal, 0, 0, 4) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(1, sealdata) - ZEND_ARG_INFO(1, ekeys) /* arary */ + ZEND_ARG_INFO(1, ekeys) /* array */ ZEND_ARG_INFO(0, pubkeys) /* array */ ZEND_ARG_INFO(0, method) ZEND_ARG_INFO(1, iv) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_openssl_open, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_open, 0, 0, 4) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(1, opendata) ZEND_ARG_INFO(0, ekey) ZEND_ARG_INFO(0, privkey) + ZEND_ARG_INFO(0, method) ZEND_ARG_INFO(0, iv) ZEND_END_ARG_INFO() @@ -5988,7 +5989,7 @@ PHP_FUNCTION(openssl_verify) } /* }}} */ -/* {{{ proto int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys) +/* {{{ proto int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys [, string method [, &string iv]])) Seals data */ PHP_FUNCTION(openssl_seal) { @@ -6119,7 +6120,7 @@ clean_exit: } /* }}} */ -/* {{{ proto bool openssl_open(string data, &string opendata, string ekey, mixed privkey) +/* {{{ proto bool openssl_open(string data, &string opendata, string ekey, mixed privkey [, string method [, string iv]]) Opens data */ PHP_FUNCTION(openssl_open) { diff --git a/ext/openssl/tests/bug75307.phpt b/ext/openssl/tests/bug75307.phpt new file mode 100644 index 0000000000..606f7a523b --- /dev/null +++ b/ext/openssl/tests/bug75307.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #75307 Wrong reflection for openssl_open function +--SKIPIF-- +<?php +if (!extension_loaded("openssl")) die("skip openssl not available"); +if (!extension_loaded("reflection")) die("skip reflection not available"); +?> +--FILE-- +<?php +$rf = new ReflectionFunction('openssl_open'); +var_dump($rf->getNumberOfParameters()); +var_dump($rf->getNumberOfRequiredParameters()); +?> +===DONE=== +--EXPECT-- +int(6) +int(4) +===DONE=== |