mirror of
https://github.com/php/php-src.git
synced 2026-04-18 13:31:27 +02:00
For rationale, see https://github.com/php/php-src/pull/6787 Extensions migrated in this part: * bcmath * bz2 * calendar * com_dotnet * ctype Closes GH-6797.
24 lines
430 B
PHP
24 lines
430 B
PHP
--TEST--
|
|
bzopen(): throw TypeError if filename contains null bytes
|
|
--EXTENSIONS--
|
|
bz2
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
bzopen("file\0", "w");
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
|
|
try {
|
|
bzopen("file\0", "r");
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
bzopen(): Argument #1 ($file) must not contain null bytes
|
|
bzopen(): Argument #1 ($file) must not contain null bytes
|