You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/zlib/tests/deflate_add_error.phpt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,5 +27,5 @@ try {
27
27
28
28
?>
29
29
--EXPECT--
30
-
deflate_add(): supplied resource is not a valid zlib deflate resource
31
-
Flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH
30
+
deflate_add(): Argument #1 ($context) must be of type DeflateContext, resource given
31
+
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
Copy file name to clipboardExpand all lines: ext/zlib/tests/inflate_add_error.phpt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,5 +26,5 @@ try {
26
26
27
27
?>
28
28
--EXPECT--
29
-
inflate_add(): supplied resource is not a valid zlib inflate resource
30
-
Flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH
29
+
inflate_add(): Argument #1 ($context) must be of type InflateContext, resource given
30
+
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
zend_value_error("Compression level ("ZEND_LONG_FMT") must be within -1..9", level);
1080
+
zend_value_error("deflate_init(): \"level\" option must be between -1 and 9");
1081
1081
RETURN_THROWS();
1082
1082
}
1083
1083
1084
1084
if (options&& (option_buffer=zend_hash_str_find(options, ZEND_STRL("memory"))) !=NULL) {
1085
1085
memory=zval_get_long(option_buffer);
1086
1086
}
1087
1087
if (memory<1||memory>9) {
1088
-
zend_value_error("Compression memory level ("ZEND_LONG_FMT") must be within 1..9", memory);
1088
+
zend_value_error("deflate_init(): \"memory\" option must be between 1 and 9");
1089
1089
RETURN_THROWS();
1090
1090
}
1091
1091
1092
1092
if (options&& (option_buffer=zend_hash_str_find(options, ZEND_STRL("window"))) !=NULL) {
1093
1093
window=zval_get_long(option_buffer);
1094
1094
}
1095
1095
if (window<8||window>15) {
1096
-
zend_value_error("zlib window size (logarithm) ("ZEND_LONG_FMT") must be within 8..15", window);
1096
+
zend_value_error("deflate_init(): \"window\" option must be between 8 and 15");
1097
1097
RETURN_THROWS();
1098
1098
}
1099
1099
@@ -1108,7 +1108,7 @@ PHP_FUNCTION(deflate_init)
1108
1108
caseZ_DEFAULT_STRATEGY:
1109
1109
break;
1110
1110
default:
1111
-
zend_value_error("Strategy must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY");
1111
+
zend_value_error("deflate_init(): \"strategy\" option must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY");
1112
1112
RETURN_THROWS();
1113
1113
}
1114
1114
@@ -1122,7 +1122,7 @@ PHP_FUNCTION(deflate_init)
1122
1122
casePHP_ZLIB_ENCODING_DEFLATE:
1123
1123
break;
1124
1124
default:
1125
-
zend_value_error("Encoding mode must be ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE");
1125
+
zend_argument_value_error(1, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE");
1126
1126
RETURN_THROWS();
1127
1127
}
1128
1128
@@ -1186,8 +1186,7 @@ PHP_FUNCTION(deflate_add)
1186
1186
break;
1187
1187
1188
1188
default:
1189
-
zend_value_error(
1190
-
"Flush mode must be ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK or ZLIB_FINISH");
1189
+
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");
0 commit comments