|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-24 22:50 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ XMLWriter::endElement() fails to emit a warning if too many parameters (= parameters at all) are passed. Gave me some trouble because I assumed it would write the ending tag of the specified tagname ("</$tagname>"). Reproduce code: --------------- <?php header('Content-Type: text/xml; charset=utf-8'); $xml = new XMLWriter; $xml->openMemory(); $xml->startDocument('1.0', 'UTF-8', 'yes'); $xml->writeComment('Generated by XMLWriter'); $xml->startElement('root'); $xml->writeElement('timestamp', time()); $xml->endElement('root'); // </root> echo $xml->flush(); ?> Expected result: ---------------- Warning: Wrong parameter count for XMLWriter::endElement() in %s on line %d Actual result: -------------- No warning