Bug #74737 [NEW]: Incorrect ReflectionFunction information for mysqli_get_client_info
| From: | tandre at themeetgroup dot com | Date: | Sat, 10 Jun 2017 04:27:38 +0000 |
| Subject: | Bug #74737 [NEW]: Incorrect ReflectionFunction information for mysqli_get_client_info | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-209460@lists.php.net to get a copy of this message | ||
From: tandre at themeetgroup dot com
Operating system:
PHP version: Irrelevant
Package: MySQLi related
Bug Type: Bug
Bug description:Incorrect ReflectionFunction information for mysqli_get_client_info
Description:
------------
ReflectionFunction reports that mysqli_get_client_info has 1 required
parameter. This is incorrect. Currently, it ignores the values of its
parameters.
See the example provided with
https://secure.php.net/manual/en/mysqli.get-client-info.php#refsect1-mysqli.get-client-info-examples
> /* We don't need a connection to determine
> the version of mysql client library */
(Also, the documented function signature should be changed to indicate
that the parameter is optional, but that's not the main part of this
issue)
Test script:
---------------
var_dump((new
ReflectionFunction('mysqli_get_client_info'))->getNumberOfRequiredParameters());
var_dump((new
ReflectionFunction('mysqli_get_client_info'))->getNumberOfOptionalParameters());
Expected result:
----------------
// 0 required parameters, might as well say 1 optional parameter
int(0)
int(1)
Actual result:
--------------
// incorrectly says there is 1 required parameter
int(1)
int(1)
--
Edit bug report at https://bugs.php.net/bug.php?id=74737&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74737&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74737&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74737&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74737&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74737&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74737&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74737&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74737&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74737&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74737&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74737&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74737&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74737&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74737&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74737&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74737&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74737&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74737&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74737&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74737&r=mysqlcfg