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

From: Date: Sat, 22 Sep 2018 14:20:27 +0000
Subject: Bug #76918 [Opn->Ver]: Wrong parameters names for \hash_update_file when using reflection
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217195@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: cmb@php.net Reported by: php at janmarten dot name Summary: Wrong parameters names for \hash_update_file when using reflection -Status: Open +Status: Verified Type: Bug Package: Reflection related Operating System: Linux PHP Version: 7.3.0RC1 Block user comment: N Private report: N New Comment: See <https://github.com/php/php-src/blob/php-7.3.0RC1/ext/hash/hash.c#L1362-L1366>. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#217195) next »