|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-22 08:52 UTC] tony2001@php.net
[2006-02-24 16:58 UTC] helly@php.net
[2006-02-24 17:05 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
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) { } }