PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_Parser » Bug #3557

Using func mode generates warnings when using "function xmltag_()"

Details

Submitted2005-02-22 17:43 UTC
Fromcmoehrke at netviser dot de
Assignedschst
StatusClosed
PackageXML_Parser
PHP Version5.0.3
OSLinux
Roadmaps(Not assigned)

Comments

[2005-02-22 17:43 UTC] cmoehrke at netviser dot de

Description:
------------
Using a default function names xmltag_ results in Warnings

Reproduce code:
---------------
class myHandler extends XML_Parser
{
protected function xmltag ()
{
echo "start";
return true;
}

protected function xmltag_ ()
{
echo "stop";
return true;
}
}

Expected result:
----------------
No Notice :-)

Actual result:
--------------
Notice: Undefined variable: attribs in /usr/local/php/pear/XML/Parser.php on line 598

Line 598 is:
call_user_func(array(&$this->_handlerObj, 'xmltag_'), $xp, $elem, $attribs);

$attribs does not exist in this method. This line was copied from the method above