ID: 24644
Comment by: erik at erikcentral dot net
Reported By: Bertrand dot Willm at laposte dot net
Status: Open
Bug Type: XML related
Operating System: Windows XP
PHP Version: 5.0.0b1 (beta1)
New Comment:
Correction.
The class works from the CLI but causes apache to segfault. Linux
phpV5.0.0b1
Previous Comments:
------------------------------------------------------------------------
[2003-08-07 16:07:54] erik at erikcentral dot net
<snip>
function CreateXMLParser() {
$this->parser = xml_parser_create("ISO-8859-1");
$new_ref = $this;
xml_set_object($this->parser, $new_ref);
xml_set_element_handler($this->parser,array($this,"myOpenElement"),array($this,"myCloseElement"));
xml_set_character_data_handler($this->parser,array($this,"myCharData"));
}
<snip>
works on Linux phpV5.0.0b1
Thanks [EMAIL PROTECTED]
------------------------------------------------------------------------
[2003-07-29 09:12:47] [EMAIL PROTECTED]
Just a note to say I've now tested this with sane data and using
[EMAIL PROTECTED]'s array. It works fine if you call the base class
directly. I moved the $this->privateFunction() call to the
EndElement() function to check what's happening; when called via the
extended class, the entire thing works except that privateFunction()
throws its (expected) error.
Basically the xml parser handlers are bypassing the ppp checks.
Leaving this bug open as unsure whether this is intended behaviour.
------------------------------------------------------------------------
[2003-07-22 12:52:49] Bertrand dot Willm at laposte dot net
There is not difference with or without the &.
------------------------------------------------------------------------
[2003-07-16 02:54:13] [EMAIL PROTECTED]
Not good, but anyway please try without & for $this:
array($this...)
------------------------------------------------------------------------
[2003-07-16 01:15:11] Bertrand dot Willm at laposte dot net
I replace the following line :
xml_set_element_handler($parser, 'StartElement', 'EndElement');
with :
xml_set_element_handler($parser, array(&$this, 'StartElement'),
array(&$this, 'EndElement'));
but PHP crashes.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24644
--
Edit this bug report at http://bugs.php.net/?id=24644&edit=1