xref: /PHP-8.3/ext/xmlreader/tests/bug73246.phpt (revision 74859783)
1--TEST--
2Bug #73246 (XMLReader: encoding length not checked)
3--EXTENSIONS--
4xmlreader
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--
12Warning: XMLReader::open(): Encoding must not contain NUL bytes in %s on line %d
13
14Warning: XMLReader::XML(): Encoding must not contain NUL bytes in %s on line %d
15