1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/ext/bz2/tests/bzopen_string_filename_with_null_bytes.phpt
Max Semenik 56f90492d6 Migrate skip checks to --EXTENSIONS--, p1
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.
2021-03-22 17:51:02 +01:00

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