php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75307 Wrong reflection for openssl_open function
Submitted: 2017-10-03 12:14 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: ossinkine at ya dot ru Assigned:
Status: Closed Package: OpenSSL related
PHP Version: 7.1.10 OS: Ubuntu
Private report: No CVE-ID: None
 [2017-10-03 12:14 UTC] 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

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 21:42 UTC] sadhooklay at gmail dot com
Did you mean $parameters[5] not $parameters[4] right?
 [2017-10-25 13:39 UTC] ossinkine at ya dot ru
No, fifth parameter is $parameter[4]
 [2017-10-27 15:07 UTC] krakjoe@php.net
Automatic comment on behalf of fabien.villepinte@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=51ea2cfbe1c8c3cbfdc381c6f2ff4d43af520938
Log: Fix bug #75307 Wrong reflection for openssl_open function
 [2017-10-27 15:08 UTC] krakjoe@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC