mirror of
https://github.com/php/php-src.git
synced 2026-04-22 23:48:14 +02:00
56f90492d6
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
379 B
PHP
24 lines
379 B
PHP
--TEST--
|
|
Bug #72613 (Inadequate error handling in bzread())
|
|
--EXTENSIONS--
|
|
bz2
|
|
--FILE--
|
|
<?php
|
|
$fp = bzopen(__DIR__.'/72613.bz2', 'r');
|
|
if ($fp === FALSE) {
|
|
exit("ERROR: bzopen()");
|
|
}
|
|
$data = "";
|
|
while (!feof($fp)) {
|
|
$res = bzread($fp);
|
|
if ($res === FALSE) {
|
|
exit("ERROR: bzread()");
|
|
}
|
|
$data .= $res;
|
|
}
|
|
bzclose($fp);
|
|
?>
|
|
DONE
|
|
--EXPECT--
|
|
ERROR: bzread()
|