Bug #75307 [Com]: Wrong reflection for openssl_open function
| From: | sadhooklay at gmail dot com | Date: | Tue, 24 Oct 2017 21:42:49 +0000 |
| Subject: | Bug #75307 [Com]: Wrong reflection for openssl_open function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212301@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75307&edit=1
ID: 75307
Comment by: sadhooklay at gmail dot com
Reported by: ossinkine at ya dot ru
Summary: Wrong reflection for openssl_open function
Status: Open
Type: Bug
Package: OpenSSL related
Operating System: Ubuntu
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
Did you mean $parameters[5] not $parameters[4] right?
Previous Comments:
------------------------------------------------------------------------
[2017-10-03 12:14:41] ossinkine at ya dot ru
Description:
------------
Reflection for openssl_open returns 5 required parameters "data", "opendata",
"ekey", "privkey", "iv". But actually 5 parameter is optional. And
parameters names also are different from documentation: http://php.net/openssl_open
Test script:
---------------
$reflection = new ReflectionFunction('openssl_open');
$parameters = $reflection->getParameters();
var_dump($parameters[4]->isOptional()); // false
Expected result:
----------------
$parameters[4]->isOptional() returns true
Actual result:
--------------
$parameters[4]->isOptional() returns false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75307&edit=1