|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76918 Wrong parameters names for \hash_update_file when using reflection
Submitted: 2018-09-22 13:42 UTC Modified: 2018-09-25 15:19 UTC
From: php at janmarten dot name Assigned: pollita (profile)
Status: Closed Package: Reflection related
PHP Version: 7.3.0RC1 OS: Linux
Private report: No CVE-ID: None
 [2018-09-22 13:42 UTC] php at janmarten dot name
When creating a reflection function instance for \hash_update_file, the parameters that return from calling getParameters show a name that does not correspond with the documentation.

While that in itself is not an issue, really, the parameter name $context is used twice in that list. I encountered this issue when trying to build an argument list using the same parameters as for some internal functions.

Having $context end up twice in that list causes obvious issues, like:

PHP Fatal error:  Redefinition of parameter $context

Test script:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-22 14:20 UTC]
-Status: Open +Status: Verified
 [2018-09-25 15:19 UTC]
-Assigned To: +Assigned To: pollita
 [2018-09-25 16:11 UTC]
Automatic comment on behalf of pollita
Log: Fixed bug #76918 Repeated parameter name in arg info
 [2018-09-25 16:11 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat May 08 23:01:23 2021 UTC