blob: 0e1711e0f87da457fa858a81a5eb1987543ebb93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--TEST--
Test incremental inflate_add() error functionality
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$badResource = fopen("php://memory", "r+");
var_dump(inflate_add($badResource, "test"));
$resource = inflate_init(ZLIB_ENCODING_DEFLATE);
$badFlushType = 6789;
var_dump(inflate_add($resource, "test", $badFlushType));
?>
--EXPECTF--
Warning: inflate_add(): Invalid zlib.inflate resource in %s on line %d
bool(false)
Warning: inflate_add(): flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH in %s on line %d
bool(false)
|