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

Reply via email to