#43099 [Opn->Csd]: XMLWriter::endElement() doesn't use WRONG_PARAM_COUNT

From: Date: Wed, 24 Oct 2007 22:50:39 +0000
Subject: #43099 [Opn->Csd]: XMLWriter::endElement() doesn't use WRONG_PARAM_COUNT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118921@lists.php.net to get a copy of this message
 ID:               43099
 Updated by:       iliaa@php.net
 Reported By:      root at mantoru dot de
-Status:           Open
+Status:           Closed
 Bug Type:         XML Writer
 Operating System: *
 PHP Version:      5.2.4
 New Comment:

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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2007-10-24 18:27:32] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43099&edit=1


Thread (2 messages)

« previous php.bugs (#118921) next »