mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
0e5d654409
To get proper errors and sensible behaviour, as the current behaviour is somewhat insane and part of it should be axed ASAP. The behaviour is mostly intact with some minor BC breaks which are mentioned in UPGRADING. Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
29 lines
533 B
PHP
29 lines
533 B
PHP
--TEST--
|
|
Bug #73135 (xml_parse() segmentation fault)
|
|
--EXTENSIONS--
|
|
xml
|
|
--CREDITS--
|
|
edgarsandi - <edgar.r.sandi@gmail.com>
|
|
--FILE--
|
|
<?php
|
|
function start_elem($parser, $xml) {
|
|
xml_parse($parser, $xml);
|
|
}
|
|
|
|
function dummy() {}
|
|
|
|
$xml = <<<HERE
|
|
<a xmlns="ahihi">
|
|
<bar foo="ahihi"/>
|
|
</a>
|
|
HERE;
|
|
|
|
$parser = xml_parser_create_ns();
|
|
xml_set_element_handler($parser, 'start_elem', 'dummy');
|
|
xml_parse($parser, $xml);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Parser must not be called recursively in %s:%d
|
|
Stack trace:
|
|
%a
|