Bug #71595 [NEW]: NS end handler is never called

From: Date: Mon, 15 Feb 2016 02:38:33 +0000
Subject: Bug #71595 [NEW]: NS end handler is never called
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199215@lists.php.net to get a copy of this message
From: anrdaemon at freemail dot ru Operating system: Windows PHP version: 5.6.18 Package: XML related Bug Type: Bug Bug description:NS end handler is never called Description: ------------ When NS-aware parser is created, the handler set by xml_set_end_namespace_decl_handler() is never called. Test script: --------------- <?php $indent = ''; $parser = xml_parser_create_ns('UTF-8'); xml_set_end_namespace_decl_handler($parser, function($self, $name) { global $indent; $ns = $name ?: '(default)'; print $indent . "/NS:{$ns}\n"; }); // Expecting at least one mention of /NS: ... xml_parse($parser, '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE shape PUBLIC "-//Dia//DTD Dia shape 1.0//EN" "http://www.daa.com.au/~james/dia-shape-ns"> <shape> <svg xmlns:svg="http://www.w3.org/2000/svg" svg:width="300px" svg:height="300px" svg:viewBox="0 0 3 3"> <svg:circle svg:style="fill: yellow;" cx="1.5" cy="1.5" r="0.5"/> </svg> </shape>', true); print xml_error_string(xml_get_error_code($parser)) . "\n"; ?> Expected result: ---------------- Expecting at least one mention of "/NS:...". Especially one, where parser leaving the enclosed SVG structure. Actual result: -------------- No error (No really, there's no error. But... Where's my handlers?) -- Edit bug report at https://bugs.php.net/bug.php?id=71595&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71595&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71595&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71595&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71595&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71595&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71595&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71595&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71595&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71595&r=support Expected behavior: https://bugs.php.net/fix.php?id=71595&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71595&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71595&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71595&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71595&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71595&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71595&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71595&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71595&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71595&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71595&r=mysqlcfg

« previous php.bugs (#199215) next »