#36428 [NEW]: Incorrect error message for PDO::fetchAll
| From: | stochnagara at hotmail dot com | Date: | Fri, 17 Feb 2006 15:35:46 +0000 |
| Subject: | #36428 [NEW]: Incorrect error message for PDO::fetchAll | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-93378@lists.php.net to get a copy of this message | ||
From: stochnagara at hotmail dot com
Operating system: win xp
PHP version: 5CVS-2006-02-17 (snap)
PHP Bug Type: PDO related
Bug description: Incorrect error message for PDO::fetchAll
Description:
------------
Trying to fetch DB result into a SimpleXMLElement instance produces an
incorrect error message.
Reproduce code:
---------------
$q = new PDO('sqlite::memory:');
$q->exec ("CREATE TABLE test (a)");
$q->exec ("INSERT INTO test (a) VALUES (1)");
var_dump ($q->query ("SELECT a FROM test")->fetchAll(PDO::FETCH_CLASS,
'SimpleXMLElement', array ('<root/>')));
Expected result:
----------------
Some consistent error message.
Actual result:
--------------
Warning: PDOStatement::fetchAll() [function.fetchAll]: Node no longer
exists in c:\program files\apache group\Apache\htdocs\standart\index.php
on line 6
array(1) {
[0]=>
object(SimpleXMLElement)#3 (0) {
}
}
--
Edit bug report at http://bugs.php.net/?id=36428&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36428&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36428&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36428&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36428&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36428&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36428&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36428&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36428&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36428&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36428&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36428&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36428&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36428&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36428&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36428&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36428&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36428&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36428&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36428&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36428&r=mysqlcfg