|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-21 05:45 UTC] sniper@php.net
[2004-01-21 12:31 UTC] aeolianmeson at hotmail dot com
[2004-01-21 12:31 UTC] aeolianmeson at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 11:00:01 2025 UTC |
Description: ------------ Using Expat XML functions. The character data handler will occasionally return only a first part of data. It will be immediately called again and return the rest. This bug only occurred around the 20th and 40th records in a dataset containing about 80. This occurred with multiple data-files where the consistency between records has been verified. Dustin Oprea, PHP-programming extraordinaire Sample: <logentry><date>2004.01.21</date><time>01:33:38</time><ip>127.0.0.1</ip><querystring>INSERT INTO residents VALUES (55, "Chambers", "Harveasha", '0', '0', '', '216', '')</querystring><position>backup.php/3</position></logentry> Reproduce code: --------------- // gets the last label recorded function getlabel() { global $stack; $tagname = array_pop($stack); array_push($stack, $tagname); return $tagname; } // character-data handler function havedata($parser, $data) { global $recorddata; $data = trim($data); if(strlen($data) == 0) return; $recorddata[getlabel()] = $data; } Expected result: ---------------- INSERT INTO residents VALUES (54, "Lewis", "Theresa", '0', '0', '', '215', '') TAG= position backup.php/3 TAG= logentry TAG= date 2004.01.21 TAG= time 01:33:38 TAG= ip 127.0.0.1 TAG= querystring --> INSERT INTO residents VALUES (55, "Chambers", "Harveasha", '0', '0', '', '216', '') TAG= position backup.php/3 TAG= logentry TAG= date 2004.01.21 TAG= time 01:33:38 TAG= ip 127.0.0.1 TAG= querystring INSERT INTO residents VALUES (56, "Pierrie", "Ghezell", '0', '0', '', '216', '') TAG= position Actual result: -------------- INSERT INTO residents VALUES (54, "Lewis", "Theresa", '0', '0', '', '215', '') TAG= position backup.php/3 TAG= logentry TAG= date 2004.01.21 TAG= time 01:33:38 TAG= ip 127.0.0.1 TAG= querystring --> INSERT INTO residen --> ts VALUES (55, "Chambers", "Harveasha", '0', '0', '', '216', '') TAG= position backup.php/3 TAG= logentry TAG= date 2004.01.21 TAG= time 01:33:38 TAG= ip 127.0.0.1 TAG= querystring INSERT INTO residents VALUES (56, "Pierrie", "Ghezell", '0', '0', '', '216', '') TAG= position