PHP 4.0 Bug #6175: XML functions no longer work in objects
| From: | jon at csh dot rit dot edu | Date: | Tue, 15 Aug 2000 16:41:34 +0000 |
| Subject: | PHP 4.0 Bug #6175: XML functions no longer work in objects | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-29000@lists.php.net to get a copy of this message | ||
From: jon@csh.rit.edu
Operating system: FreeBSD 4.1-STABLE
PHP version: 4.0 Latest CVS (15/08/2000)
PHP Bug Type: Other
Bug description: XML functions no longer work in objects
After updating to the latest CVS this morning, existing code that uses the XML parser functions in
an object no longer work.
In the constructor:
$this->parser = xml_parser_create();
xml_set_object($this->parser, &$this);
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, true);
xml_set_element_handler($this->parser, "startElement", "endElement");
xml_set_character_data_handler($this->parser, "defaultHandler");
And in another method:
xml_parse($this->parser, $this->buffer, true);
When xml_parse is executed, PHP reports a long list of warnings like:
Warning: Unable to call defaultHandler() in ./lib/Help.php on line 121
(line 121 is the xml_parse line)
The "defaultHandler", "endElement", and "startElement" methods all
exist in the object.
One of the changes made over the last few days in either PHP or Zend must have broken something
here. I tshould be fixed or documented as changed (I might have missed something) before 4.0.2 is
release.