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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ossinkine at ya dot ru
New email:
PHP Version: OS:

 

 [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

Pull Requests

Pull requests:

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC