Bug #75307 [Com]: Wrong reflection for openssl_open function
Edit report at https://bugs.php.net/bug.php?id=75307&edit=1
ID: 75307
Comment by: ossinkine at ya dot ru
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:
No, fifth parameter is $parameter[4]
Previous Comments:
------------------------------------------------------------------------
[2017-10-24 21:42:49] sadhooklay at gmail dot com
Did you mean $parameters[5] not $parameters[4] right?
------------------------------------------------------------------------
[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
Thread (4 messages)