cvs: php4 /pear/XML Parser.php

From: Date: Thu, 15 Mar 2001 17:34:07 +0000
Subject: cvs: php4 /pear/XML Parser.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4583@lists.php.net to get a copy of this message
uw Thu Mar 15 09:34:07 2001 EDT Modified files: /php4/pear/XML Parser.php Log: If the creation of the parser fails, the constructor "throws" an error by returning a XML_Parser_Error object. That means the user will get an object of the type XML_Parser_Error and the methods parse() and parseString() can't get called. Index: php4/pear/XML/Parser.php diff -u php4/pear/XML/Parser.php:1.6 php4/pear/XML/Parser.php:1.7 --- php4/pear/XML/Parser.php:1.6 Thu Mar 15 09:30:01 2001 +++ php4/pear/XML/Parser.php Thu Mar 15 09:34:06 2001 @@ -222,10 +222,6 @@ return new XML_Parser_Error("no input"); } - if (!is_resource($this->parser)) { - return new XML_Parser_Error("no parser"); - } - while ($data = fread($this->fp, 2048)) { $err = $this->parseString($data, feof($this->fp)); if (PEAR::isError($err)) { @@ -234,7 +230,6 @@ } return true; - } // }}} @@ -250,10 +245,6 @@ */ function parseString($data, $eof = false) { - if (!is_resource($this->parser)) { - return new XML_Parser_Error("no parser"); - } - if (!xml_parse($this->parser, $data, $eof)) { $err = new XML_Parser_Error($this->parser); xml_parser_free($this->parser);

« previous php.cvs (#4583) next »