xref: /PHP-8.0/ext/xmlreader/tests/bug73246.phpt (revision 272df442)
1--TEST--
2Bug #73246 (XMLReader: encoding length not checked)
3--SKIPIF--
4<?php
5if (!extension_loaded("xmlreader")) die("skip xmlreader extension not available");
6?>
7--FILE--
8<?php
9$reader = new XMLReader();
10$reader->open(__FILE__, "UTF\0-8");
11$reader->XML('<?xml version="1.0"?><root/>', "UTF\0-8");
12?>
13--EXPECTF--
14Warning: XMLReader::open(): Encoding must not contain NUL bytes in %s on line %d
15
16Warning: XMLReader::XML(): Encoding must not contain NUL bytes in %s on line %d
17