xref: /PHP-8.2/ext/bz2/tests/bug72613.phpt (revision 56f90492)
1--TEST--
2Bug #72613 (Inadequate error handling in bzread())
3--EXTENSIONS--
4bz2
5--FILE--
6<?php
7$fp = bzopen(__DIR__.'/72613.bz2', 'r');
8if ($fp === FALSE) {
9    exit("ERROR: bzopen()");
10}
11$data = "";
12while (!feof($fp)) {
13    $res = bzread($fp);
14    if ($res === FALSE) {
15        exit("ERROR: bzread()");
16    }
17    $data .= $res;
18}
19bzclose($fp);
20?>
21DONE
22--EXPECT--
23ERROR: bzread()
24