|  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: -
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
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:

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


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


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]
Automatic comment on behalf of
Log: Fix bug #75307 Wrong reflection for openssl_open function
 [2017-10-27 15:08 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 11 23:01:29 2023 UTC