bug73246.phpt 410 B

1234567891011121314
  1. --TEST--
  2. Bug #73246 (XMLReader: encoding length not checked)
  3. --EXTENSIONS--
  4. xmlreader
  5. --FILE--
  6. <?php
  7. $reader = new XMLReader();
  8. $reader->open(__FILE__, "UTF\0-8");
  9. $reader->XML('<?xml version="1.0"?><root/>', "UTF\0-8");
  10. ?>
  11. --EXPECTF--
  12. Warning: XMLReader::open(): Encoding must not contain NUL bytes in %s on line %d
  13. Warning: XMLReader::XML(): Encoding must not contain NUL bytes in %s on line %d