Bug #74595 [Opn->Csd]: ReflectionMethod::getParameters returns incorrect number of parameters

From: Date: Fri, 19 May 2017 16:06:03 +0000
Subject: Bug #74595 [Opn->Csd]: ReflectionMethod::getParameters returns incorrect number of parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209196@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74595&edit=1 ID: 74595 Updated by: laruence@php.net Reported by: skalicky dot tomas at hotmail dot com Summary: ReflectionMethod::getParameters returns incorrect number of parameters -Status: Open +Status: Closed Type: Bug Package: Reflection related Operating System: All PHP Version: 7.1.5 Block user comment: N Private report: N New Comment: Automatic comment on behalf of andrew.nester.dev@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=2e5a747b59b24a44dd95c7b68c1072927123dc0b Log: Fixed #74595 - ReflectionMethod::getParameters returns incorrect number of parameters Previous Comments: ------------------------------------------------------------------------ [2017-05-15 13:01:08] andrew dot nester dot dev at gmail dot com thanks for reporting this issue! just added PR fixing this. ------------------------------------------------------------------------ [2017-05-15 09:48:58] skalicky dot tomas at hotmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=74595&edit=1

« previous php.bugs (#209196) next »