PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/simplexml/tests/bug76712.phpt ('BUg #76712 (Assignment of empty string creates extraneous text node)')

Script

1: <?php
2: $sxe 
= new SimpleXMLElement('<foo></foo>');
3:
$sxe->addChild('bar''');
4: echo 
$sxe->asXML();
5:
6:
$sxe = new SimpleXMLElement('<foo></foo>');
7:
$sxe->addChild('bar');
8:
$sxe->bar '';
9: echo 
$sxe->asXML();
10:
?>
11:
===DONE===
12:

Expected

<?xml version="1.0"?>
<foo><bar/></foo>
<?xml version="1.0"?>
<foo><bar/></foo>
===DONE===

Output

<?xml version="1.0"?>
<foo><bar></bar></foo>
<?xml version="1.0"?>
<foo><bar></bar></foo>
===DONE===

Diff

002+ <foo><bar></bar></foo>
002- <foo><bar/></foo>
004+ <foo><bar></bar></foo>
004- <foo><bar/></foo>

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (50 days ago)

Copyright © 2005-2019 The PHP Group
All rights reserved.