ID: 36428 Updated by: [EMAIL PROTECTED] Reported By: stochnagara at hotmail dot com Status: Closed Bug Type: SimpleXML related Operating System: * PHP Version: 5.1.* Assigned To: helly New Comment:
Make this PDO:FETCH_PROPS_LATE. The other developers didn't like the name without the '_'. Previous Comments: ------------------------------------------------------------------------ [2006-02-24 16:58:11] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Use CVS and add new flag PDO:FETCH_PROPSLATE. SimpleXMLElement does not allow to write properties prior to calling the ctor. In 5.1 you would need to change to use FETCH_FUNC instead. ------------------------------------------------------------------------ [2006-02-22 08:52:10] [EMAIL PROTECTED] This error message comes from SimpleXML. Reclassified. ------------------------------------------------------------------------ [2006-02-17 16:35:27] stochnagara at hotmail dot com 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 this bug report at http://bugs.php.net/?id=36428&edit=1
