From: otto dot wyss at orpatec dot ch Operating system: Irrelevant PHP version: 5.2.12 PHP Bug Type: Feature/Change Request Bug description: errorInfo should allow for returning msg only
Description: ------------ Currently PDO::errorInfo returns an array (SQLSTATE, driver specific code, message) but almost ever only the message is interesting. Therefore I propose to expand the API to add an obtional array index, if present only the indexed information will be returned. The return type probably has to be changed to mixed as well. Current calls without parameter return the current array, future calls i.e. errorInfo (2) will only return the text message as a string. -- Edit bug report at http://bugs.php.net/?id=51044&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51044&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51044&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51044&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51044&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51044&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51044&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51044&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51044&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51044&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51044&r=support Expected behavior: http://bugs.php.net/fix.php?id=51044&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51044&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51044&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51044&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51044&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51044&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51044&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51044&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51044&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51044&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51044&r=mysqlcfg