029.phpt 396 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. tidy_get_body() crash
  3. --EXTENSIONS--
  4. tidy
  5. --FILE--
  6. <?php
  7. // bug report taken from http://news.php.net/php.notes/130628
  8. $inputs = array(
  9. '<frameset > </frameset>',
  10. '<html><frameset> </frameset> </html',
  11. );
  12. foreach ($inputs as $input) {
  13. $t = tidy_parse_string($input);
  14. $t->cleanRepair();
  15. var_dump(tidy_get_body($t));
  16. }
  17. echo "Done\n";
  18. ?>
  19. --EXPECT--
  20. NULL
  21. NULL
  22. Done