|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: root at mantoru dot de
New email:
PHP Version: OS:


 [2007-10-24 18:27 UTC] root at mantoru dot de
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:
header('Content-Type: text/xml; charset=utf-8');
$xml = new XMLWriter;
$xml->startDocument('1.0', 'UTF-8', 'yes');
$xml->writeComment('Generated by XMLWriter');
$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-24 22:50 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 04:01:28 2024 UTC