Bug #76918 [NEW]: Wrong parameters names for \hash_update_file when using reflection

From: Date: Sat, 22 Sep 2018 13:42:59 +0000
Subject: Bug #76918 [NEW]: Wrong parameters names for \hash_update_file when using reflection
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217193@lists.php.net to get a copy of this message
From:             php at janmarten dot name
Operating system: Linux
PHP version:      7.3.0RC1
Package:          Reflection related
Bug Type:         Bug
Bug description:Wrong parameters names for \hash_update_file when using reflection

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 bug report at https://bugs.php.net/bug.php?id=76918&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76918&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76918&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76918&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76918&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76918&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76918&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76918&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76918&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76918&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76918&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76918&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76918&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76918&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76918&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76918&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76918&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76918&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76918&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76918&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76918&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#217193) next »