mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Improve some ValueError messages
Closes GH-5340
This commit is contained in:
@@ -317,7 +317,7 @@ PHP_FUNCTION(bzread)
|
||||
php_stream_from_zval(stream, bz);
|
||||
|
||||
if (len < 0) {
|
||||
zend_value_error("Length cannot be negative");
|
||||
zend_argument_value_error(2, "must be greater than or equal to 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ PHP_FUNCTION(bzopen)
|
||||
}
|
||||
|
||||
if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) {
|
||||
zend_value_error("'%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.", mode);
|
||||
zend_argument_value_error(2, "must be a valid mode. Only 'w' and 'r' are supported");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@ var_dump(bzopen($fp, "r"));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
'' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.
|
||||
bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported
|
||||
|
||||
Warning: bzopen(): Filename cannot be empty in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: bzopen(): Filename cannot be empty in %s on line %d
|
||||
bool(false)
|
||||
'x' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.
|
||||
'rw' is not a valid mode for bzopen(). Only 'w' and 'r' are supported.
|
||||
bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported
|
||||
bzopen(): Argument #2 ($mode) must be a valid mode. Only 'w' and 'r' are supported
|
||||
|
||||
Warning: bzopen(no_such_file): Failed to open stream: No such file or directory in %s on line %d
|
||||
bool(false)
|
||||
|
||||
@@ -21,7 +21,7 @@ var_dump(bzread($fd, 100000));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(0) ""
|
||||
Length cannot be negative
|
||||
bzread(): Argument #2 ($length) must be greater than or equal to 0
|
||||
string(1) "R"
|
||||
string(2) "is"
|
||||
string(251) "ing up from the heart of the desert
|
||||
|
||||
@@ -21,7 +21,7 @@ var_dump(bzread($fd, 100000));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(0) ""
|
||||
Length cannot be negative
|
||||
bzread(): Argument #2 ($length) must be greater than or equal to 0
|
||||
string(1) "R"
|
||||
string(2) "is"
|
||||
string(251) "ing up from the heart of the desert
|
||||
|
||||
@@ -35,7 +35,7 @@ PHP_FUNCTION(unixtojd)
|
||||
if (!ts) {
|
||||
ts = time(NULL);
|
||||
} else if (ts < 0) {
|
||||
zend_value_error("Timestamp must not be negative");
|
||||
zend_argument_value_error(1, "must be greater than or equal to 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ PHP_FUNCTION(cal_info)
|
||||
|
||||
|
||||
if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) {
|
||||
zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal);
|
||||
zend_argument_value_error(1, "must be a valid calendar ID");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ PHP_FUNCTION(cal_days_in_month)
|
||||
}
|
||||
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal);
|
||||
zend_argument_value_error(1, "must be a valid calendar ID");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ PHP_FUNCTION(cal_to_jd)
|
||||
}
|
||||
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal);
|
||||
zend_argument_value_error(1, "must be a valid calendar ID");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ PHP_FUNCTION(cal_from_jd)
|
||||
}
|
||||
|
||||
if (cal < 0 || cal >= CAL_NUM_CALS) {
|
||||
zend_value_error("Invalid calendar ID: " ZEND_LONG_FMT, cal);
|
||||
zend_argument_value_error(2, "must be a valid calendar ID");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
calendar = &cal_conversion_table[cal];
|
||||
|
||||
@@ -49,7 +49,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, zend_long gm)
|
||||
}
|
||||
|
||||
if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */
|
||||
zend_value_error("This function is only valid for years between 1970 and 2037 inclusive");
|
||||
zend_argument_value_error(1, "must be between 1970 and 2037 (inclusive)");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,5 +18,5 @@ try{
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Invalid calendar ID: -1
|
||||
cal_days_in_month(): Argument #1 ($calendar) must be a valid calendar ID
|
||||
Invalid date
|
||||
|
||||
@@ -13,4 +13,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Invalid calendar ID: -1
|
||||
cal_from_jd(): Argument #2 ($calendar) must be a valid calendar ID
|
||||
|
||||
@@ -216,4 +216,4 @@ Array
|
||||
[calname] => Julian
|
||||
[calsymbol] => CAL_JULIAN
|
||||
)
|
||||
Invalid calendar ID: 99999
|
||||
cal_info(): Argument #1 ($calendar) must be a valid calendar ID
|
||||
|
||||
@@ -13,4 +13,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Invalid calendar ID: -1
|
||||
cal_to_jd(): Argument #1 ($calendar) must be a valid calendar ID
|
||||
|
||||
@@ -22,4 +22,4 @@ try {
|
||||
2000-04-23
|
||||
2001-04-15
|
||||
2002-03-31
|
||||
This function is only valid for years between 1970 and 2037 inclusive
|
||||
easter_date(): Argument #1 ($year) must be between 1970 and 2037 (inclusive)
|
||||
|
||||
@@ -20,7 +20,7 @@ var_dump(unixtojd(null)) . PHP_EOL;
|
||||
var_dump(unixtojd(time())) . PHP_EOL;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Timestamp must not be negative
|
||||
unixtojd(): Argument #1 ($timestamp) must be greater than or equal to 0
|
||||
int(%d)
|
||||
int(%d)
|
||||
int(%d)
|
||||
|
||||
168
ext/gd/gd.c
168
ext/gd/gd.c
@@ -736,7 +736,7 @@ PHP_FUNCTION(imagesetstyle)
|
||||
|
||||
num_styles = zend_hash_num_elements(Z_ARRVAL_P(styles));
|
||||
if (num_styles == 0) {
|
||||
zend_value_error("Styles array must not be empty");
|
||||
zend_argument_value_error(2, "cannot be empty");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -767,12 +767,12 @@ PHP_FUNCTION(imagecreatetruecolor)
|
||||
}
|
||||
|
||||
if (x_size <= 0 || x_size >= INT_MAX) {
|
||||
zend_value_error("Invalid width (x_size)");
|
||||
zend_argument_value_error(1, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (y_size <= 0 || y_size >= INT_MAX) {
|
||||
zend_value_error("Invalid height (y_size)");
|
||||
zend_argument_value_error(2, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -819,7 +819,7 @@ PHP_FUNCTION(imagetruecolortopalette)
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
if (ncolors <= 0 || ZEND_LONG_INT_OVFL(ncolors)) {
|
||||
zend_value_error("Number of colors has to be greater than zero and no more than %d", INT_MAX);
|
||||
zend_argument_value_error(3, "must be greater than 0 and less than %d", INT_MAX);
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -1022,9 +1022,9 @@ PHP_FUNCTION(imagelayereffect)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define CHECK_RGBA_RANGE(component, name) \
|
||||
#define CHECK_RGBA_RANGE(component, name, argument_number) \
|
||||
if (component < 0 || component > gd##name##Max) { \
|
||||
zend_value_error(#name " component is out of range, must be between 0 and %d (inclusive)", gd##name##Max); \
|
||||
zend_argument_value_error(argument_number, "must be between 0 and %d (inclusive)", gd##name##Max); \
|
||||
RETURN_THROWS(); \
|
||||
}
|
||||
|
||||
@@ -1043,10 +1043,10 @@ PHP_FUNCTION(imagecolorallocatealpha)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha, 5);
|
||||
|
||||
ct = gdImageColorAllocateAlpha(im, red, green, blue, alpha);
|
||||
if (ct < 0) {
|
||||
@@ -1070,10 +1070,10 @@ PHP_FUNCTION(imagecolorresolvealpha)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha, 5);
|
||||
|
||||
RETURN_LONG(gdImageColorResolveAlpha(im, red, green, blue, alpha));
|
||||
}
|
||||
@@ -1093,10 +1093,10 @@ PHP_FUNCTION(imagecolorclosestalpha)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha, 5);
|
||||
|
||||
RETURN_LONG(gdImageColorClosestAlpha(im, red, green, blue, alpha));
|
||||
}
|
||||
@@ -1110,16 +1110,16 @@ PHP_FUNCTION(imagecolorexactalpha)
|
||||
zend_long red, green, blue, alpha;
|
||||
gdImagePtr im;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ollll", &IM, gd_image_ce, &red, &green, &blue, &alpha) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ollll", &IM, gd_image_ce, &red, &green, &blue, &alpha) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha, 5);
|
||||
|
||||
RETURN_LONG(gdImageColorExactAlpha(im, red, green, blue, alpha));
|
||||
}
|
||||
@@ -1362,12 +1362,12 @@ PHP_FUNCTION(imagecreate)
|
||||
}
|
||||
|
||||
if (x_size <= 0 || x_size >= INT_MAX) {
|
||||
zend_value_error("Invalid width (x_size)");
|
||||
zend_argument_value_error(1, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (y_size <= 0 || y_size >= INT_MAX) {
|
||||
zend_value_error("Invalid height (y_size)");
|
||||
zend_argument_value_error(2, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -1601,12 +1601,12 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
|
||||
}
|
||||
|
||||
if (width < 1) {
|
||||
zend_value_error("Width must be at least 1");
|
||||
zend_argument_value_error(4, "must be greater than or equal to 1");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (height < 1) {
|
||||
zend_value_error("Height must be at least 1");
|
||||
zend_argument_value_error(5, "must be greater than or equal to 1");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -2023,9 +2023,9 @@ PHP_FUNCTION(imagecolorallocate)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
|
||||
ct = gdImageColorAllocate(im, red, green, blue);
|
||||
if (ct < 0) {
|
||||
@@ -2101,9 +2101,9 @@ PHP_FUNCTION(imagecolorclosest)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
|
||||
RETURN_LONG(gdImageColorClosest(im, red, green, blue));
|
||||
}
|
||||
@@ -2123,9 +2123,9 @@ PHP_FUNCTION(imagecolorclosesthwb)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
|
||||
RETURN_LONG(gdImageColorClosestHWB(im, red, green, blue));
|
||||
}
|
||||
@@ -2157,7 +2157,7 @@ PHP_FUNCTION(imagecolordeallocate)
|
||||
gdImageColorDeallocate(im, col);
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
zend_value_error("Color index %d out of range", col);
|
||||
zend_argument_value_error(2, "must be between 0 and %d", gdImageColorsTotal(im));
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
@@ -2177,9 +2177,9 @@ PHP_FUNCTION(imagecolorresolve)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
|
||||
RETURN_LONG(gdImageColorResolve(im, red, green, blue));
|
||||
}
|
||||
@@ -2199,9 +2199,9 @@ PHP_FUNCTION(imagecolorexact)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
|
||||
RETURN_LONG(gdImageColorExact(im, red, green, blue));
|
||||
}
|
||||
@@ -2222,10 +2222,9 @@ PHP_FUNCTION(imagecolorset)
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(IM);
|
||||
|
||||
CHECK_RGBA_RANGE(red, Red);
|
||||
CHECK_RGBA_RANGE(green, Green);
|
||||
CHECK_RGBA_RANGE(blue, Blue);
|
||||
CHECK_RGBA_RANGE(alpha, Alpha);
|
||||
CHECK_RGBA_RANGE(red, Red, 2);
|
||||
CHECK_RGBA_RANGE(green, Green, 3);
|
||||
CHECK_RGBA_RANGE(blue, Blue, 4);
|
||||
|
||||
col = color;
|
||||
|
||||
@@ -2284,8 +2283,13 @@ PHP_FUNCTION(imagegammacorrect)
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ( input <= 0.0 || output <= 0.0 ) {
|
||||
zend_value_error("Gamma values must be positive");
|
||||
if (input <= 0.0) {
|
||||
zend_argument_value_error(2, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (output <= 0.0) {
|
||||
zend_argument_value_error(3, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -2594,7 +2598,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled)
|
||||
COL = NPOINTS;
|
||||
NPOINTS = zend_hash_num_elements(Z_ARRVAL_P(POINTS));
|
||||
if (NPOINTS % 2 != 0) {
|
||||
zend_value_error("Points array must have an even number of elements");
|
||||
zend_argument_value_error(2, "must have an even number of elements");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
NPOINTS /= 2;
|
||||
@@ -2607,7 +2611,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled)
|
||||
|
||||
nelem = zend_hash_num_elements(Z_ARRVAL_P(POINTS));
|
||||
if (npoints < 3) {
|
||||
zend_value_error("Polygon must have at least 3 points");
|
||||
zend_argument_value_error(3, "must be greater than or equal to 3");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -2983,8 +2987,23 @@ PHP_FUNCTION(imagecopyresized)
|
||||
dstH = DH;
|
||||
dstW = DW;
|
||||
|
||||
if (dstW <= 0 || dstH <= 0 || srcW <= 0 || srcH <= 0) {
|
||||
zend_value_error("Invalid image dimensions");
|
||||
if (dstW <= 0) {
|
||||
zend_argument_value_error(3, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (dstH <= 0) {
|
||||
zend_argument_value_error(4, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (srcW <= 0) {
|
||||
zend_argument_value_error(5, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (srcH <= 0) {
|
||||
zend_argument_value_error(6, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -3466,14 +3485,14 @@ PHP_FUNCTION(imageconvolution)
|
||||
|
||||
nelem = zend_hash_num_elements(Z_ARRVAL_P(hash_matrix));
|
||||
if (nelem != 3) {
|
||||
zend_value_error("Convolution matrix must be a 3x3 array");
|
||||
zend_argument_value_error(2, "must be a 3x3 array");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if ((var = zend_hash_index_find(Z_ARRVAL_P(hash_matrix), (i))) != NULL && Z_TYPE_P(var) == IS_ARRAY) {
|
||||
if (zend_hash_num_elements(Z_ARRVAL_P(var)) != 3 ) {
|
||||
zend_value_error("Convolution matrix must be a 3x3 array, matrix[%d] only has %d elements", i, zend_hash_num_elements(Z_ARRVAL_P(var)));
|
||||
zend_argument_value_error(2, "must be a 3x3 array, matrix[%d] only has %d elements", i, zend_hash_num_elements(Z_ARRVAL_P(var)));
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -3481,7 +3500,7 @@ PHP_FUNCTION(imageconvolution)
|
||||
if ((var2 = zend_hash_index_find(Z_ARRVAL_P(var), j)) != NULL) {
|
||||
matrix[i][j] = (float) zval_get_double(var2);
|
||||
} else {
|
||||
zend_value_error("Convolution matrix must be a 3x3 array, matrix[%d][%d] cannot be found (missing integer key)", i, j);
|
||||
zend_argument_value_error(2, "must be a 3x3 array, matrix[%d][%d] cannot be found (missing integer key)", i, j);
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
@@ -3526,7 +3545,7 @@ PHP_FUNCTION(imageflip)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_value_error("Unknown flip mode");
|
||||
zend_argument_value_error(2, "must be a valid mode");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -3575,28 +3594,28 @@ PHP_FUNCTION(imagecrop)
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") -1)) != NULL) {
|
||||
rect.x = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Cropping rectangle is missing x position");
|
||||
zend_argument_value_error(2, "must have an 'x' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) {
|
||||
rect.y = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Cropping rectangle is missing y position");
|
||||
zend_argument_value_error(2, "must have a 'y' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) {
|
||||
rect.width = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Cropping rectangle is missing width");
|
||||
zend_argument_value_error(2, "must have a 'width' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) {
|
||||
rect.height = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Cropping rectangle is missing height");
|
||||
zend_argument_value_error(2, "must have a 'height' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -3638,14 +3657,14 @@ PHP_FUNCTION(imagecropauto)
|
||||
|
||||
case GD_CROP_THRESHOLD:
|
||||
if (color < 0 || (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im))) {
|
||||
zend_value_error("Color argument missing with threshold mode");
|
||||
zend_argument_value_error(4, "must be greater than or equal to 0 when using the threshold mode");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
im_crop = gdImageCropThreshold(im, color, (float) threshold);
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_value_error("Unknown crop mode");
|
||||
zend_argument_value_error(2, "must be a valid mode");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -3762,28 +3781,28 @@ PHP_FUNCTION(imageaffine)
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") - 1)) != NULL) {
|
||||
rect.x = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Clip array is missing x position");
|
||||
zend_argument_value_error(3, "must have an 'x' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) {
|
||||
rect.y = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Clip array is missing y position");
|
||||
zend_argument_value_error(3, "must have a 'y' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) {
|
||||
rect.width = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Clip array is missing width");
|
||||
zend_argument_value_error(3, "must have a 'width' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) {
|
||||
rect.height = zval_get_long(tmp);
|
||||
} else {
|
||||
zend_value_error("Clip array is missing height");
|
||||
zend_argument_value_error(3, "must have a 'height' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
pRect = ▭
|
||||
@@ -3827,14 +3846,14 @@ PHP_FUNCTION(imageaffinematrixget)
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "x", sizeof("x") - 1)) != NULL) {
|
||||
x = zval_get_double(tmp);
|
||||
} else {
|
||||
zend_value_error("Options array is missing x position");
|
||||
zend_argument_value_error(2, "must have an 'x' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "y", sizeof("y") - 1)) != NULL) {
|
||||
y = zval_get_double(tmp);
|
||||
} else {
|
||||
zend_value_error("Options array is missing y position");
|
||||
zend_argument_value_error(2, "must have a 'y' key");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -3894,14 +3913,19 @@ PHP_FUNCTION(imageaffinematrixconcat)
|
||||
zval *tmp;
|
||||
zval *z_m1;
|
||||
zval *z_m2;
|
||||
int i, nelems;
|
||||
int i;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "aa", &z_m1, &z_m2) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (((nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m1))) != 6) || (nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m2))) != 6) {
|
||||
zend_value_error("Affine arrays must have six elements");
|
||||
if (zend_hash_num_elements(Z_ARRVAL_P(z_m1)) != 6) {
|
||||
zend_argument_value_error(1, "must have 6 elements");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (zend_hash_num_elements(Z_ARRVAL_P(z_m2)) != 6) {
|
||||
zend_argument_value_error(1, "must have 6 elements");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,5 +21,5 @@ trycatch_dump(
|
||||
unlink($file);
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Width must be at least 1
|
||||
!! [ValueError] Height must be at least 1
|
||||
!! [ValueError] imagecreatefromgd2part(): Argument #4 ($width) must be greater than or equal to 1
|
||||
!! [ValueError] imagecreatefromgd2part(): Argument #5 ($height) must be greater than or equal to 1
|
||||
|
||||
@@ -21,5 +21,5 @@ trycatch_dump(
|
||||
unlink($file);
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Width must be at least 1
|
||||
!! [ValueError] Height must be at least 1
|
||||
!! [ValueError] imagecreatefromgd2part(): Argument #4 ($width) must be greater than or equal to 1
|
||||
!! [ValueError] imagecreatefromgd2part(): Argument #5 ($height) must be greater than or equal to 1
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
--TEST--
|
||||
Bug #55005 (imagepolygon num_points requirement)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once __DIR__ . '/func.inc';
|
||||
|
||||
$g = imagecreate(300, 300);
|
||||
$bgnd = imagecolorallocate($g, 255, 255, 255);
|
||||
$fgnd = imagecolorallocate($g, 0, 0, 0);
|
||||
trycatch_dump(
|
||||
fn () => imagefilledpolygon($g, array(100,10, 100,100, 180,100), 2, $fgnd),
|
||||
fn () => imagepolygon($g, array(200,10, 200,100, 280,100), 2, $fgnd)
|
||||
);
|
||||
?>
|
||||
--EXPECTF--
|
||||
!! [ValueError] Polygon must have at least 3 points
|
||||
!! [ValueError] Polygon must have at least 3 points
|
||||
--TEST--
|
||||
Bug #55005 (imagepolygon num_points requirement)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once __DIR__ . '/func.inc';
|
||||
|
||||
$g = imagecreate(300, 300);
|
||||
$bgnd = imagecolorallocate($g, 255, 255, 255);
|
||||
$fgnd = imagecolorallocate($g, 0, 0, 0);
|
||||
trycatch_dump(
|
||||
fn () => imagefilledpolygon($g, array(100,10, 100,100, 180,100), 2, $fgnd),
|
||||
fn () => imagepolygon($g, array(200,10, 200,100, 280,100), 2, $fgnd)
|
||||
);
|
||||
?>
|
||||
--EXPECTF--
|
||||
!! [ValueError] imagefilledpolygon(): Argument #3 ($num_points_or_col) must be greater than or equal to 3
|
||||
!! [ValueError] imagepolygon(): Argument #3 ($num_points_or_col) must be greater than or equal to 3
|
||||
|
||||
@@ -16,4 +16,4 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Color argument missing with threshold mode
|
||||
!! [ValueError] imagecropauto(): Argument #4 ($color) must be greater than or equal to 0 when using the threshold mode
|
||||
|
||||
@@ -19,5 +19,5 @@ trycatch_dump(
|
||||
?>
|
||||
DONE
|
||||
--EXPECT--
|
||||
!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647
|
||||
!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647
|
||||
DONE
|
||||
|
||||
@@ -20,5 +20,5 @@ imagedestroy($im);
|
||||
?>
|
||||
====DONE====
|
||||
--EXPECT--
|
||||
Styles array must not be empty
|
||||
imagesetstyle(): Argument #2 ($styles) cannot be empty
|
||||
====DONE====
|
||||
|
||||
@@ -17,4 +17,4 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Gamma values must be positive
|
||||
!! [ValueError] imagegammacorrect(): Argument #2 ($inputgamma) must be greater than 0
|
||||
|
||||
@@ -63,9 +63,9 @@ int(657930)
|
||||
int(657930)
|
||||
|
||||
--Octal -012--
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
|
||||
--Octal 0377--
|
||||
int(16714250)
|
||||
@@ -83,9 +83,9 @@ int(657930)
|
||||
int(657930)
|
||||
|
||||
--Hexa-decimal -0xA--
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
|
||||
--Hexa-decimal 0xFF--
|
||||
int(16714250)
|
||||
|
||||
@@ -51,25 +51,25 @@ foreach($values as $key => $value) {
|
||||
*** Testing imagecolorallocate() : usage variations ***
|
||||
|
||||
--Decimal 256--
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
|
||||
--Octal 0400--
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
|
||||
--Hexa-decimal 0x100--
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Red component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Green component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] Blue component is out of range, must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #2 ($red) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #3 ($green) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
!! [ValueError] imagecolorallocate(): Argument #4 ($blue) must be between 0 and 255 (inclusive)
|
||||
|
||||
@@ -22,4 +22,4 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Color index 101 out of range
|
||||
!! [ValueError] imagecolordeallocate(): Argument #2 ($index) must be between 0 and 1
|
||||
|
||||
@@ -22,4 +22,4 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Color index -1 out of range
|
||||
!! [ValueError] imagecolordeallocate(): Argument #2 ($index) must be between 0 and 1
|
||||
|
||||
@@ -27,4 +27,4 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Convolution matrix must be a 3x3 array
|
||||
!! [ValueError] imageconvolution(): Argument #2 ($matrix3x3) must be a 3x3 array
|
||||
|
||||
@@ -35,5 +35,5 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Convolution matrix must be a 3x3 array, matrix[2] only has 2 elements
|
||||
!! [ValueError] Convolution matrix must be a 3x3 array, matrix[2][2] cannot be found (missing integer key)
|
||||
!! [ValueError] imageconvolution(): Argument #2 ($matrix3x3) must be a 3x3 array, matrix[2] only has 2 elements
|
||||
!! [ValueError] imageconvolution(): Argument #2 ($matrix3x3) must be a 3x3 array, matrix[2][2] cannot be found (missing integer key)
|
||||
|
||||
@@ -17,5 +17,5 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Invalid width (x_size)
|
||||
!! [ValueError] Invalid height (y_size)
|
||||
!! [ValueError] imagecreate(): Argument #1 ($x_size) must be greater than 0
|
||||
!! [ValueError] imagecreate(): Argument #2 ($y_size) must be greater than 0
|
||||
|
||||
@@ -19,5 +19,5 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Invalid width (x_size)
|
||||
!! [ValueError] Invalid height (y_size)
|
||||
!! [ValueError] imagecreatetruecolor(): Argument #1 ($x_size) must be greater than 0
|
||||
!! [ValueError] imagecreatetruecolor(): Argument #2 ($y_size) must be greater than 0
|
||||
|
||||
@@ -19,4 +19,4 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647
|
||||
!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647
|
||||
|
||||
@@ -20,5 +20,5 @@ trycatch_dump(
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647
|
||||
!! [ValueError] Number of colors has to be greater than zero and no more than 2147483647
|
||||
!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647
|
||||
!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647
|
||||
|
||||
@@ -299,12 +299,12 @@ PHP_FUNCTION(json_decode)
|
||||
}
|
||||
|
||||
if (depth <= 0) {
|
||||
zend_value_error("Depth must be greater than zero");
|
||||
zend_argument_value_error(3, "must be greater than 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (depth > INT_MAX) {
|
||||
zend_value_error("Depth must be lower than %d", INT_MAX);
|
||||
zend_argument_value_error(3, "must be less than %d", INT_MAX);
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ try {
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Depth must be lower than %d
|
||||
json_decode(): Argument #3 ($depth) must be less than %d
|
||||
|
||||
@@ -19,4 +19,4 @@ try {
|
||||
*** Testing json_decode() : error conditions ***
|
||||
|
||||
-- Testing json_decode() function with depth below 0 --
|
||||
Depth must be greater than zero
|
||||
json_decode(): Argument #3 ($depth) must be greater than 0
|
||||
|
||||
@@ -1299,7 +1299,7 @@ PHP_METHOD(sqlite3, openBlob)
|
||||
}
|
||||
|
||||
if (ZEND_NUM_ARGS() >= 4 && CHECK_NULL_PATH(dbname, dbname_len)) {
|
||||
zend_value_error("dbname must not contain null bytes");
|
||||
zend_argument_type_error(4, "must not contain null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -1405,10 +1405,13 @@ PHP_METHOD(sqlite3, backup)
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if ((ZEND_NUM_ARGS() >= 2 && CHECK_NULL_PATH(source_dbname, source_dbname_length))
|
||||
|| (ZEND_NUM_ARGS() >= 3 && CHECK_NULL_PATH(destination_dbname, destination_dbname_length))
|
||||
) {
|
||||
zend_value_error("dbname must not contain null bytes");
|
||||
if (ZEND_NUM_ARGS() >= 2 && CHECK_NULL_PATH(source_dbname, source_dbname_length)) {
|
||||
zend_argument_type_error(2, "must not contain null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (ZEND_NUM_ARGS() >= 3 && CHECK_NULL_PATH(destination_dbname, destination_dbname_length)) {
|
||||
zend_argument_type_error(3, "must not contain null bytes");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -704,7 +704,7 @@ PHP_FUNCTION(count)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (mode != COUNT_NORMAL && mode != COUNT_RECURSIVE) {
|
||||
zend_value_error("Mode value is invalid");
|
||||
zend_argument_value_error(2, "must be a valid mode");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -2385,12 +2385,12 @@ PHP_FUNCTION(extract)
|
||||
extract_type &= 0xff;
|
||||
|
||||
if (extract_type < EXTR_OVERWRITE || extract_type > EXTR_IF_EXISTS) {
|
||||
zend_value_error("Invalid extract type");
|
||||
zend_argument_value_error(2, "must be a valid extract type");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (extract_type > EXTR_SKIP && extract_type <= EXTR_PREFIX_IF_EXISTS && ZEND_NUM_ARGS() < 3) {
|
||||
zend_value_error("Specified extract type requires the prefix parameter");
|
||||
zend_argument_value_error(3, "is required when using this extract type");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ PHP_FUNCTION(assert_options)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_value_error("Unknown value " ZEND_LONG_FMT, what);
|
||||
zend_argument_value_error(1, "must have a valid value");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -850,7 +850,7 @@ PHP_FUNCTION(putenv)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (setting_len == 0 || setting[0] == '=') {
|
||||
zend_value_error("Invalid parameter syntax");
|
||||
zend_argument_value_error(1, "must have a valid syntax");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ PHP_FUNCTION(scandir)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (dirn_len < 1) {
|
||||
zend_value_error("Directory name cannot be empty");
|
||||
zend_argument_value_error(1, "cannot be empty");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ PHP_FUNCTION(dns_check_record)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (hostname_len == 0) {
|
||||
zend_value_error("Host cannot be empty");
|
||||
zend_argument_value_error(1, "cannot be empty");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ PHP_FUNCTION(dns_check_record)
|
||||
}
|
||||
|
||||
if (hostname_len == 0) {
|
||||
zend_value_error("Host cannot be empty");
|
||||
zend_argument_value_error(1, "cannot be empty");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@ PHP_FUNCTION(file)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) {
|
||||
zend_value_error("'" ZEND_LONG_FMT "' flag is not supported", flags);
|
||||
zend_argument_value_error(2, "must be a valid flag value");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -1492,7 +1492,7 @@ PHP_FUNCTION(ftruncate)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (size < 0) {
|
||||
zend_value_error("Negative size is not supported");
|
||||
zend_argument_value_error(2, "must be greater than or equal to 0");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
Mode value is invalid
|
||||
Mode value is invalid
|
||||
Mode value is invalid
|
||||
count(): Argument #2 ($mode) must be a valid mode
|
||||
count(): Argument #2 ($mode) must be a valid mode
|
||||
count(): Argument #2 ($mode) must be a valid mode
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
|
||||
@@ -33,6 +33,6 @@ try {
|
||||
*** Testing Error Conditions ***
|
||||
|
||||
Notice: A non well formed numeric value encountered in %s on line %d
|
||||
Invalid extract type
|
||||
Invalid extract type
|
||||
Specified extract type requires the prefix parameter
|
||||
extract(): Argument #2 ($extract_type) must be a valid extract type
|
||||
extract(): Argument #2 ($extract_type) must be a valid extract type
|
||||
extract(): Argument #3 ($prefix) is required when using this extract type
|
||||
|
||||
@@ -10,4 +10,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Unknown value 1000
|
||||
assert_options(): Argument #1 ($what) must have a valid value
|
||||
|
||||
@@ -11,4 +11,4 @@ try {
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Directory name cannot be empty
|
||||
scandir(): Argument #1 ($directory) cannot be empty
|
||||
|
||||
@@ -10,4 +10,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
|
||||
@@ -236,12 +236,12 @@ array(3) {
|
||||
[2]=>
|
||||
string(6) "Line 3"
|
||||
}
|
||||
'24' flag is not supported
|
||||
'25' flag is not supported
|
||||
'26' flag is not supported
|
||||
'27' flag is not supported
|
||||
'28' flag is not supported
|
||||
'29' flag is not supported
|
||||
'30' flag is not supported
|
||||
'31' flag is not supported
|
||||
'32' flag is not supported
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
file(): Argument #2 ($flags) must be a valid flag value
|
||||
|
||||
@@ -63,5 +63,5 @@ bool(true)
|
||||
int(1200)
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
|
||||
Binary file not shown.
@@ -77,7 +77,7 @@ echo "Done\n";
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -85,7 +85,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -93,7 +93,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -101,7 +101,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -109,7 +109,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -117,7 +117,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -125,7 +125,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -133,7 +133,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -141,7 +141,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -149,7 +149,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -157,7 +157,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -165,7 +165,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -173,7 +173,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -181,7 +181,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -189,7 +189,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -197,7 +197,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -205,7 +205,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -213,7 +213,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -221,7 +221,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -229,7 +229,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -237,7 +237,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -245,7 +245,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -253,7 +253,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -261,7 +261,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -271,7 +271,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -279,7 +279,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -287,7 +287,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -295,7 +295,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -303,7 +303,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -311,7 +311,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -319,7 +319,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -327,7 +327,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -335,7 +335,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -343,7 +343,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -351,7 +351,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -359,7 +359,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -367,7 +367,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -375,7 +375,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -383,7 +383,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -391,7 +391,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -399,7 +399,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -407,7 +407,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -415,7 +415,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -423,7 +423,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -431,7 +431,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -439,7 +439,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -447,7 +447,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -455,7 +455,7 @@ bool(true)
|
||||
-- Testing ftruncate(): try truncating file to a negative size --
|
||||
bool(true)
|
||||
int(0)
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
int(0)
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
@@ -59,7 +59,7 @@ bool(true)
|
||||
truncation with new_size=10
|
||||
bool(true)
|
||||
------ stream_truncate negative size: -------
|
||||
Negative size is not supported
|
||||
ftruncate(): Argument #2 ($size) must be greater than or equal to 0
|
||||
------ stream_truncate bad return: -------
|
||||
truncation with new_size=0
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ try {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(true)
|
||||
string(5) "value"
|
||||
@@ -37,6 +37,6 @@ bool(true)
|
||||
string(0) ""
|
||||
bool(true)
|
||||
bool(false)
|
||||
Invalid parameter syntax
|
||||
Invalid parameter syntax
|
||||
putenv(): Argument #1 ($setting) must have a valid syntax
|
||||
putenv(): Argument #1 ($setting) must have a valid syntax
|
||||
Done
|
||||
|
||||
@@ -9,4 +9,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Host cannot be empty
|
||||
dns_check_record(): Argument #1 ($hostname) cannot be empty
|
||||
|
||||
Reference in New Issue
Block a user