Bug #76918 [Ver->Csd]: Wrong parameters names for \hash_update_file when using reflection

From: Date: Tue, 25 Sep 2018 16:11:35 +0000
Subject: Bug #76918 [Ver->Csd]: Wrong parameters names for \hash_update_file when using reflection
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217235@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76918&edit=1

 ID:                 76918
 Updated by:         pollita@php.net
 Reported by:        php at janmarten dot name
 Summary:            Wrong parameters names for \hash_update_file when
                     using reflection
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            Reflection related
 Operating System:   Linux
 PHP Version:        7.3.0RC1
 Assigned To:        pollita
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2018-09-22 14:20:27] cmb@php.net

See <https://github.com/php/php-src/blob/php-7.3.0RC1/ext/hash/hash.c#L1362-L1366>.

------------------------------------------------------------------------
[2018-09-22 13:42:59] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76918&edit=1


Thread (3 messages)

« previous php.bugs (#217235) next »