?>
--EXPECT--
-deflate_add(): supplied resource is not a valid zlib deflate resource
-Flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH
+deflate_add(): Argument #1 ($context) must be of type DeflateContext, resource given
+deflate_add(): Argument #3 ($flush_behavior) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH
?>
--EXPECT--
-Encoding mode must be ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE
-Compression level (42) must be within -1..9
-Compression level (-2) must be within -1..9
-Compression memory level (0) must be within 1..9
-Compression memory level (10) must be within 1..9
+deflate_init(): Argument #1 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
+deflate_init(): "level" option must be between -1 and 9
+deflate_init(): "level" option must be between -1 and 9
+deflate_init(): "memory" option must be between 1 and 9
+deflate_init(): "memory" option must be between 1 and 9
?>
--EXPECT--
-inflate_add(): supplied resource is not a valid zlib inflate resource
-Flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH
+inflate_add(): Argument #1 ($context) must be of type InflateContext, resource given
+inflate_add(): Argument #3 ($flush_mode) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH
}
efree(strings);
if (!EG(exception)) {
- zend_value_error("Dictionary entries must be non-empty strings");
+ zend_argument_value_error(2, "must not contain empty strings");
}
return 0;
}
efree(ptr);
} while (--ptr >= strings);
efree(strings);
- zend_value_error("Dictionary entries must not contain a NULL-byte");
+ zend_argument_value_error(2, "must not contain strings with null bytes");
return 0;
}
}
level = zval_get_long(option_buffer);
}
if (level < -1 || level > 9) {
- zend_value_error("Compression level (" ZEND_LONG_FMT ") must be within -1..9", level);
+ zend_value_error("deflate_init(): \"level\" option must be between -1 and 9");
RETURN_THROWS();
}
memory = zval_get_long(option_buffer);
}
if (memory < 1 || memory > 9) {
- zend_value_error("Compression memory level (" ZEND_LONG_FMT ") must be within 1..9", memory);
+ zend_value_error("deflate_init(): \"memory\" option must be between 1 and 9");
RETURN_THROWS();
}
window = zval_get_long(option_buffer);
}
if (window < 8 || window > 15) {
- zend_value_error("zlib window size (logarithm) (" ZEND_LONG_FMT ") must be within 8..15", window);
+ zend_value_error("deflate_init(): \"window\" option must be between 8 and 15");
RETURN_THROWS();
}
case Z_DEFAULT_STRATEGY:
break;
default:
- zend_value_error("Strategy must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY");
+ zend_value_error("deflate_init(): \"strategy\" option must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY");
RETURN_THROWS();
}
case PHP_ZLIB_ENCODING_DEFLATE:
break;
default:
- zend_value_error("Encoding mode must be ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE");
+ zend_argument_value_error(1, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE");
RETURN_THROWS();
}
break;
default:
- zend_value_error(
- "Flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH");
+ zend_argument_value_error(3, "must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH");
RETURN_THROWS();
}