From:             uwendel at mysql dot com
Operating system: Linux
PHP version:      5.3CVS-2008-02-19 (CVS)
PHP Bug Type:     PDO related
Bug description:  Parameter handling flaw in PDO::getAvailableDrivers()

Description:
------------
There's a little parameter handling flaw in PDO::getAvailableDrivers().
The function expects no parameter to be passed. If you pass some, it does
not bail like most other functions do which do not expect any parameter.

[EMAIL PROTECTED]:~/php53> sapi/cli/php -r
'var_dump(PDO::getAvailableDrivers("too many", "args"));
var_dump(get_include_path("too many", "args"));'
array(4) {
  [0]=>
  string(7) "sqlite2"
  [1]=>
  string(6) "sqlite"
  [2]=>
  string(5) "pgsql"
  [3]=>
  string(5) "mysql"
}

Warning: get_include_path() expects exactly 0 parameters, 2 given in
Command line code on line 1
NULL


Reproduce code:
---------------
[EMAIL PROTECTED]:~/php53> sapi/cli/php -r
'var_dump(PDO::getAvailableDrivers("too many", "args"));'


Expected result:
----------------
Warning: PDO::getAvailableDrivers() expects exactly 0 parameters, 2 given
in Command line code on line %d
NULL

Actual result:
--------------
No warning, array returned

-- 
Edit bug report at http://bugs.php.net/?id=44166&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44166&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44166&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44166&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44166&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44166&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44166&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44166&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44166&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44166&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44166&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44166&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44166&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44166&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44166&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44166&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44166&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44166&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44166&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44166&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44166&r=mysqlcfg

Reply via email to