Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.8

Bug #2442 Call to "xmltag_ELEMENT_" not correctly managed in function funcEndHandler
Submitted: 2004-10-04 13:39 UTC
From: marion dot leclerc at equant dot com Assigned: schst
Status: Closed Package: XML_Parser
PHP Version: Irrelevant OS: Solaris 2.8
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 32 - 29 = ?

 
 [2004-10-04 13:39 UTC] marion dot leclerc at equant dot com
Description: ------------ XML_parser package 1.2.0 In the function "funcEndHandler", the call to the function "xmltag_ELEMENT_" does not work: The instruction (line 3): if (method_exists($this, $func)) {... Should be: if (method_exists($this->_handlerObj, $func)) {... Reproduce code: --------------- File test.php: ============== <?php require_once 'XML/Parser.php'; class TestParser { function xmltag_CELLGROUP($xp, $name, $attribs){ echo "START CELLGROUP"; } function xmltag_CELLGROUP_($xp, $name, $attribs){ echo "END CELLGROUP"; } } $p = &new XML_Parser(); $h = &new TestParser(); $p->setHandlerObj( $h ); $result = $p->setInputFile( 'test.xml' ) ; $p->setMode( 'func' ) ; $result = $p->parse() ; ?> File test.xml: ============== <?xml version="1.0" encoding="ISO-8859-1" ?> <workbook> <cellgroup background-color="blue" border="2"></cellgroup> </workbook> Expected result: ---------------- When executing the script test.php, I expect to see the 2 messages: START CELLGROUP (parsing tag <cellgroup>) END CELLGROUP (parsing tag </cellgroup>) Actual result: -------------- Actual result is only: START CELLGROUP (parsing tag <cellgroup>)

Comments

 [2004-10-04 16:59 UTC] schst
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/XML_Parser