PHP :: Bug #43099 :: XMLWriter::endElement() doesn't use WRONG_PARAM_COUNT
| Bug #43099 | XMLWriter::endElement() doesn't use WRONG_PARAM_COUNT | ||||
|---|---|---|---|---|---|
| Submitted: | 2007-10-24 18:27 UTC | Modified: | 2007-10-24 22:50 UTC | ||
| From: | root at mantoru dot de | Assigned: | |||
| Status: | Closed | Package: | XML Writer | ||
| PHP Version: | 5.2.4 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2007-10-24 18:27 UTC] root at mantoru dot de
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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-10-24 22:50 UTC] iliaa@php.net