Bug #74595 [NEW]: ReflectionMethod::getParameters returns incorrect number of parameters

From: Date: Mon, 15 May 2017 09:49:00 +0000
Subject: Bug #74595 [NEW]: ReflectionMethod::getParameters returns incorrect number of parameters
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209125@lists.php.net to get a copy of this message
From: skalicky dot tomas at hotmail dot com Operating system: All PHP version: 7.1.5 Package: Reflection related Bug Type: Bug Bug description:ReflectionMethod::getParameters returns incorrect number of parameters Description: ------------ Method mysqli::query supposed to have 2 parameters ($query [, $resultmode]), but ReflectionMethod::getParameters returns only first one. http://php.net/manual/en/mysqli.query.php Test script: --------------- <?php $class = new ReflectionClass('mysqli'); $method = $class->getMethod('query'); var_dump($method->getParameters()); Expected result: ---------------- array(2) { [0]=> object(ReflectionParameter)#3 (1) { ["name"]=> string(5) "query" } [1]=> object(ReflectionParameter)#4 (1) { ["name"]=> string(10) "resultmode" } } Actual result: -------------- array(1) { [0]=> object(ReflectionParameter)#3 (1) { ["name"]=> string(5) "query" } } -- Edit bug report at https://bugs.php.net/bug.php?id=74595&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74595&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74595&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74595&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74595&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74595&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74595&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74595&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74595&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74595&r=support Expected behavior: https://bugs.php.net/fix.php?id=74595&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74595&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74595&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74595&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74595&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74595&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74595&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74595&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74595&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74595&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74595&r=mysqlcfg

« previous php.bugs (#209125) next »