php.net |  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
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: php at janmarten dot name
New email:
PHP Version: OS:

 

 [2018-09-22 13:42 UTC] php at janmarten dot name
Description:
------------
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:
---------------
https://3v4l.org/Xb0V7

Expected result:
----------------
$hcontext
$filename
$scontext

Actual result:
--------------
$context
$filename
$context

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-22 14:20 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-09-25 15:19 UTC] pollita@php.net
-Assigned To: +Assigned To: pollita
 [2018-09-25 16:11 UTC] pollita@php.net
Automatic comment on behalf of pollita
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b5d0eb44c0c1a452a82054e860e8c6a9420ac5df
Log: Fixed bug #76918 Repeated parameter name in arg info
 [2018-09-25 16:11 UTC] pollita@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC