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

Test Failure Report for ext/dom/tests/bug78221.phpt ('Bug #78221 (DOMNode::normalize() doesn't remove empty text nodes)')

Script

1: <?php
2: $doc 
= new DOMDocument();
3:
$doc->loadHTML('<p id=x>foo</p>');
4:
$p $doc->getElementById('x');
5:
$p->childNodes[0]->textContent '';
6:
$p->normalize();
7:
var_dump($p->childNodes->length);
8:
?>
9:

Expected

int(0)

Output

Warning: Creating default object from empty value in /var/php_gcov/PHP_7_3/ext/dom/tests/bug78221.php on line 5

Fatal error: Uncaught Error: Call to undefined method stdClass::normalize() in /var/php_gcov/PHP_7_3/ext/dom/tests/bug78221.php:6
Stack trace:
#0 {main}
  thrown in /var/php_gcov/PHP_7_3/ext/dom/tests/bug78221.php on line 6

Diff

001+ Warning: Creating default object from empty value in /var/php_gcov/PHP_7_3/ext/dom/tests/bug78221.php on line 5
001- int(0)
002+ 
003+ Fatal error: Uncaught Error: Call to undefined method stdClass::normalize() in /var/php_gcov/PHP_7_3/ext/dom/tests/bug78221.php:6
004+ Stack trace:
005+ #0 {main}
006+   thrown in /var/php_gcov/PHP_7_3/ext/dom/tests/bug78221.php on line 6

 

Generated at Fri, 03 Dec 2021 18:13:45 +0000 (29 hours ago)

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