Home » XML » XML_Parser » Bug #588
XML_Parser incorrectly returns an error when parsing long strings
Details
| Submitted | 2004-01-16 00:46 UTC |
|---|---|
| From | dave at gottathink dot com |
| Assigned | schst |
| Status | Bogus |
| Package | XML_Parser |
| PHP Version | 4.3.4 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2004-01-16 00:46 UTC] dave at gottathink dot com
Description:
------------
xml_parse() returns a null on my system if what you give it to parse isn't the full document. Since null == false, XML_Parser thinks that an error has occurred and raises an error of its own. Adding a null check to XML_Parser::parseString() fixes the problem.
function parseString($data, $eof = false)
{
$code = xml_parse($this->parser, $data, $eof);
if (!is_null($code) && !$code) {
$err = $this->raiseError($this->parser);
xml_parser_free($this->parser);
return $err;
}
return true;
}