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