diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2015-09-02 01:13:49 +0200 |
---|---|---|
committer | Christoph M. Becker <cmb@php.net> | 2015-09-05 03:08:02 +0200 |
commit | 43b26c7b21edbc64e197f2b6ae7f0c38a166c9c9 (patch) | |
tree | e9de14bb3cc15c41c737be0a17cea685239b33f8 /ext/openssl | |
parent | dc1a8dd7f09af5807aadf3ed5ffc9c443cd9e74c (diff) | |
download | php-git-43b26c7b21edbc64e197f2b6ae7f0c38a166c9c9.tar.gz |
Fix #70395: Missing ARG_INFO for openssl_seal()
This patch adds the missing ARG_INFO for the optional 5th parameter $method.
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/openssl.c | 3 | ||||
-rw-r--r-- | ext/openssl/tests/bug70395.phpt | 19 |
2 files changed, 21 insertions, 1 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 0421524d64..cc86f0440f 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -348,11 +348,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_verify, 0, 0, 3) ZEND_ARG_INFO(0, method) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_openssl_seal, 0) +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(0, pubkeys) /* array */ + ZEND_ARG_INFO(0, method) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_openssl_open, 0) diff --git a/ext/openssl/tests/bug70395.phpt b/ext/openssl/tests/bug70395.phpt new file mode 100644 index 0000000000..bfa881a0cd --- /dev/null +++ b/ext/openssl/tests/bug70395.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #70395 (Missing ARG_INFO for openssl_seal()) +--SKIPIF-- +<?php +if (!extension_loaded("openssl")) die("skip openssl not loaded"); +?> +--FILE-- +<?php +$func = new ReflectionFunction('openssl_seal'); +$param = $func->getParameters()[4]; +var_dump($param); +var_dump($param->isOptional()); +?> +--EXPECTF-- +object(ReflectionParameter)#%d (1) { + ["name"]=> + string(6) "method" +} +bool(true) |