#27180 [NEW]: Callback parameters in xml_set_*_handler
| From: | drm at melp dot nl | Date: | Sat, 07 Feb 2004 16:15:13 +0000 |
| Subject: | #27180 [NEW]: Callback parameters in xml_set_*_handler | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969358808@lists.php.net to get a copy of this message | ||
From: drm at melp dot nl
Operating system: Windows XP
PHP version: 4.3.4
PHP Bug Type: Documentation problem
Bug description: Callback parameters in xml_set_*_handler
Description:
------------
Apache hangs when callback parameters are defined in an array (obj& obj,
string methodName) form.
I suggest the documentation type hints are changed from
xml_set_*_handler ( resource, callback, ... )
to
xml_set_*_handler ( resource, string ...)
since the an array ( ... ) notation for callbacks should be correct
according to http://nl.php.net/manual/en/language.pseudo-types.php
Note that it does the parsing until some point at the end of the XML
document. I can't quite reproduce where exactly it hangs, but i think its
the cleaning up part of the parser when the parsing is done (the $final of
xml_parse must be true to reproduce this)
or you could fix the bug, of course :P
Reproduce code:
---------------
xml_set_element_handler (
$this->parserResource,
array ( &$this, 'startElementHandler' ),
array ( &$this, 'endElementHandler' )
);
Expected result:
----------------
don't hang apache ;)
Actual result:
--------------
hangs apache, (99% cpu), probably an endless loop?
--
Edit bug report at http://bugs.php.net/?id=27180&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27180&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27180&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27180&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27180&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27180&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27180&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27180&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27180&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27180&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27180&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27180&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27180&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27180&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27180&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27180&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27180&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27180&r=float