diff options
Diffstat (limited to 'ext/gd')
62 files changed, 335 insertions, 345 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 5a820860e6..def17b8df3 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -64,8 +64,8 @@ static int le_gd, le_gd_font; #if HAVE_LIBT1 #include <t1lib.h> static int le_ps_font, le_ps_enc; -static void php_free_ps_font(zend_resource *rsrc TSRMLS_DC); -static void php_free_ps_enc(zend_resource *rsrc TSRMLS_DC); +static void php_free_ps_font(zend_resource *rsrc); +static void php_free_ps_enc(zend_resource *rsrc); #endif #include <gd.h> @@ -135,7 +135,7 @@ static void php_image_filter_smooth(INTERNAL_FUNCTION_PARAMETERS); static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS); /* End Section filters declarations */ -static gdImagePtr _php_image_create_from_string (zval *Data, char *tn, gdImagePtr (*ioctx_func_p)() TSRMLS_DC); +static gdImagePtr _php_image_create_from_string (zval *Data, char *tn, gdImagePtr (*ioctx_func_p)()); static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)()); static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)()); static int _php_image_type(char data[8]); @@ -1072,7 +1072,7 @@ PHP_INI_END() /* {{{ php_free_gd_image */ -static void php_free_gd_image(zend_resource *rsrc TSRMLS_DC) +static void php_free_gd_image(zend_resource *rsrc) { gdImageDestroy((gdImagePtr) rsrc->ptr); } @@ -1080,7 +1080,7 @@ static void php_free_gd_image(zend_resource *rsrc TSRMLS_DC) /* {{{ php_free_gd_font */ -static void php_free_gd_font(zend_resource *rsrc TSRMLS_DC) +static void php_free_gd_font(zend_resource *rsrc) { gdFontPtr fp = (gdFontPtr) rsrc->ptr; @@ -1097,9 +1097,8 @@ static void php_free_gd_font(zend_resource *rsrc TSRMLS_DC) */ void php_gd_error_method(int type, const char *format, va_list args) { - TSRMLS_FETCH(); - php_verror(NULL, "", type, format, args TSRMLS_CC); + php_verror(NULL, "", type, format, args); } /* }}} */ #endif @@ -1427,7 +1426,7 @@ PHP_FUNCTION(imageloadfont) gdFontPtr font; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file, &file_name) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &file, &file_name) == FAILURE) { return; } @@ -1457,9 +1456,9 @@ PHP_FUNCTION(imageloadfont) if (!n) { efree(font); if (php_stream_eof(stream)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "End of file while reading header"); + php_error_docref(NULL, E_WARNING, "End of file while reading header"); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading header"); + php_error_docref(NULL, E_WARNING, "Error while reading header"); } php_stream_close(stream); RETURN_FALSE; @@ -1478,14 +1477,14 @@ PHP_FUNCTION(imageloadfont) } if (overflow2(font->nchars, font->h) || overflow2(font->nchars * font->h, font->w )) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading font, invalid font header"); + php_error_docref(NULL, E_WARNING, "Error reading font, invalid font header"); efree(font); php_stream_close(stream); RETURN_FALSE; } if (body_size != body_size_check) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading font"); + php_error_docref(NULL, E_WARNING, "Error reading font"); efree(font); php_stream_close(stream); RETURN_FALSE; @@ -1501,16 +1500,16 @@ PHP_FUNCTION(imageloadfont) efree(font->data); efree(font); if (php_stream_eof(stream)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "End of file while reading body"); + php_error_docref(NULL, E_WARNING, "End of file while reading body"); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading body"); + php_error_docref(NULL, E_WARNING, "Error while reading body"); } php_stream_close(stream); RETURN_FALSE; } php_stream_close(stream); - ind = zend_list_insert(font, le_gd_font TSRMLS_CC); + ind = zend_list_insert(font, le_gd_font); /* Adding 5 to the font index so we will never have font indices * that overlap with the old fonts (with indices 1-5). The first @@ -1529,7 +1528,7 @@ PHP_FUNCTION(imagesetstyle) int *stylearr; int index = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra", &IM, &styles) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &IM, &styles) == FAILURE) { return; } @@ -1557,12 +1556,12 @@ PHP_FUNCTION(imagecreatetruecolor) zend_long x_size, y_size; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &x_size, &y_size) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &x_size, &y_size) == FAILURE) { return; } if (x_size <= 0 || y_size <= 0 || x_size >= INT_MAX || y_size >= INT_MAX) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid image dimensions"); + php_error_docref(NULL, E_WARNING, "Invalid image dimensions"); RETURN_FALSE; } @@ -1583,7 +1582,7 @@ PHP_FUNCTION(imageistruecolor) zval *IM; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } @@ -1602,14 +1601,14 @@ PHP_FUNCTION(imagetruecolortopalette) zend_long ncolors; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rbl", &IM, &dither, &ncolors) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rbl", &IM, &dither, &ncolors) == FAILURE) { return; } ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd); if (ncolors <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of colors has to be greater than zero"); + php_error_docref(NULL, E_WARNING, "Number of colors has to be greater than zero"); RETURN_FALSE; } gdImageTrueColorToPalette(im, dither, ncolors); @@ -1625,7 +1624,7 @@ PHP_FUNCTION(imagepalettetotruecolor) zval *IM; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } @@ -1647,7 +1646,7 @@ PHP_FUNCTION(imagecolormatch) gdImagePtr im1, im2; int result; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &IM1, &IM2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &IM1, &IM2) == FAILURE) { return; } @@ -1657,19 +1656,19 @@ PHP_FUNCTION(imagecolormatch) result = gdImageColorMatch(im1, im2); switch (result) { case -1: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image1 must be TrueColor" ); + php_error_docref(NULL, E_WARNING, "Image1 must be TrueColor" ); RETURN_FALSE; break; case -2: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image2 must be Palette" ); + php_error_docref(NULL, E_WARNING, "Image2 must be Palette" ); RETURN_FALSE; break; case -3: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image1 and Image2 must be the same size" ); + php_error_docref(NULL, E_WARNING, "Image1 and Image2 must be the same size" ); RETURN_FALSE; break; case -4: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image2 must have at least one color" ); + php_error_docref(NULL, E_WARNING, "Image2 must have at least one color" ); RETURN_FALSE; break; } @@ -1686,7 +1685,7 @@ PHP_FUNCTION(imagesetthickness) zend_long thick; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &IM, &thick) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &IM, &thick) == FAILURE) { return; } @@ -1706,7 +1705,7 @@ PHP_FUNCTION(imagefilledellipse) zend_long cx, cy, w, h, color; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &cx, &cy, &w, &h, &color) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllll", &IM, &cx, &cy, &w, &h, &color) == FAILURE) { return; } @@ -1727,7 +1726,7 @@ PHP_FUNCTION(imagefilledarc) gdImagePtr im; int e, st; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col, &style) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col, &style) == FAILURE) { return; } @@ -1757,7 +1756,7 @@ PHP_FUNCTION(imagealphablending) zend_bool blend; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &IM, &blend) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &IM, &blend) == FAILURE) { return; } @@ -1776,7 +1775,7 @@ PHP_FUNCTION(imagesavealpha) zend_bool save; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &IM, &save) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &IM, &save) == FAILURE) { return; } @@ -1795,7 +1794,7 @@ PHP_FUNCTION(imagelayereffect) zend_long effect; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &IM, &effect) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &IM, &effect) == FAILURE) { return; } @@ -1815,7 +1814,7 @@ PHP_FUNCTION(imagecolorallocatealpha) gdImagePtr im; int ct = (-1); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { RETURN_FALSE; } @@ -1836,7 +1835,7 @@ PHP_FUNCTION(imagecolorresolvealpha) zend_long red, green, blue, alpha; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { return; } @@ -1854,7 +1853,7 @@ PHP_FUNCTION(imagecolorclosestalpha) zend_long red, green, blue, alpha; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { return; } @@ -1872,7 +1871,7 @@ PHP_FUNCTION(imagecolorexactalpha) zend_long red, green, blue, alpha; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { return; } @@ -1891,7 +1890,7 @@ PHP_FUNCTION(imagecopyresampled) gdImagePtr im_dst, im_src; int srcH, srcW, dstH, dstW, srcY, srcX, dstY, dstX; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrllllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &DW, &DH, &SW, &SH) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrllllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &DW, &DH, &SW, &SH) == FAILURE) { return; } @@ -1933,14 +1932,14 @@ PHP_FUNCTION(imagegrabwindow) tPrintWindow pPrintWindow = 0; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &lwindow_handle, &client_area) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &lwindow_handle, &client_area) == FAILURE) { RETURN_FALSE; } window = (HWND) lwindow_handle; if (!IsWindow(window)) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Invalid window handle"); + php_error_docref(NULL, E_NOTICE, "Invalid window handle"); RETURN_FALSE; } @@ -1972,7 +1971,7 @@ PHP_FUNCTION(imagegrabwindow) if ( pPrintWindow ) { pPrintWindow(window, memDC, (UINT) client_area); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Windows API too old"); + php_error_docref(NULL, E_WARNING, "Windows API too old"); goto clean; } @@ -2073,7 +2072,7 @@ PHP_FUNCTION(imagerotate) zend_long color; zend_long ignoretransparent = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rdl|l", &SIM, °rees, &color, &ignoretransparent) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rdl|l", &SIM, °rees, &color, &ignoretransparent) == FAILURE) { RETURN_FALSE; } @@ -2096,7 +2095,7 @@ PHP_FUNCTION(imagesettile) zval *IM, *TILE; gdImagePtr im, tile; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &IM, &TILE) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &IM, &TILE) == FAILURE) { return; } @@ -2116,7 +2115,7 @@ PHP_FUNCTION(imagesetbrush) zval *IM, *TILE; gdImagePtr im, tile; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &IM, &TILE) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &IM, &TILE) == FAILURE) { return; } @@ -2136,12 +2135,12 @@ PHP_FUNCTION(imagecreate) zend_long x_size, y_size; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &x_size, &y_size) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &x_size, &y_size) == FAILURE) { return; } if (x_size <= 0 || y_size <= 0 || x_size >= INT_MAX || y_size >= INT_MAX) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid image dimensions"); + php_error_docref(NULL, E_WARNING, "Invalid image dimensions"); RETURN_FALSE; } @@ -2240,7 +2239,7 @@ static int _php_image_type (char data[8]) /* {{{ _php_image_create_from_string */ -gdImagePtr _php_image_create_from_string(zval *data, char *tn, gdImagePtr (*ioctx_func_p)() TSRMLS_DC) +gdImagePtr _php_image_create_from_string(zval *data, char *tn, gdImagePtr (*ioctx_func_p)()) { gdImagePtr im; gdIOCtx *io_ctx; @@ -2253,7 +2252,7 @@ gdImagePtr _php_image_create_from_string(zval *data, char *tn, gdImagePtr (*ioct im = (*ioctx_func_p)(io_ctx); if (!im) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passed data is not in '%s' format", tn); + php_error_docref(NULL, E_WARNING, "Passed data is not in '%s' format", tn); io_ctx->gd_free(io_ctx); return NULL; } @@ -2273,13 +2272,13 @@ PHP_FUNCTION(imagecreatefromstring) int imtype; char sig[8]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &data) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &data) == FAILURE) { return; } convert_to_string_ex(data); if (Z_STRLEN_P(data) < 8) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string or invalid image"); + php_error_docref(NULL, E_WARNING, "Empty string or invalid image"); RETURN_FALSE; } @@ -2290,41 +2289,41 @@ PHP_FUNCTION(imagecreatefromstring) switch (imtype) { case PHP_GDIMG_TYPE_JPG: #ifdef HAVE_GD_JPG - im = _php_image_create_from_string(data, "JPEG", gdImageCreateFromJpegCtx TSRMLS_CC); + im = _php_image_create_from_string(data, "JPEG", gdImageCreateFromJpegCtx); #else - php_error_docref(NULL TSRMLS_CC, E_WARNING, "No JPEG support in this PHP build"); + php_error_docref(NULL, E_WARNING, "No JPEG support in this PHP build"); RETURN_FALSE; #endif break; case PHP_GDIMG_TYPE_PNG: #ifdef HAVE_GD_PNG - im = _php_image_create_from_string(data, "PNG", gdImageCreateFromPngCtx TSRMLS_CC); + im = _php_image_create_from_string(data, "PNG", gdImageCreateFromPngCtx); #else - php_error_docref(NULL TSRMLS_CC, E_WARNING, "No PNG support in this PHP build"); + php_error_docref(NULL, E_WARNING, "No PNG support in this PHP build"); RETURN_FALSE; #endif break; case PHP_GDIMG_TYPE_GIF: - im = _php_image_create_from_string(data, "GIF", gdImageCreateFromGifCtx TSRMLS_CC); + im = _php_image_create_from_string(data, "GIF", gdImageCreateFromGifCtx); break; case PHP_GDIMG_TYPE_WBM: - im = _php_image_create_from_string(data, "WBMP", gdImageCreateFromWBMPCtx TSRMLS_CC); + im = _php_image_create_from_string(data, "WBMP", gdImageCreateFromWBMPCtx); break; case PHP_GDIMG_TYPE_GD2: - im = _php_image_create_from_string(data, "GD2", gdImageCreateFromGd2Ctx TSRMLS_CC); + im = _php_image_create_from_string(data, "GD2", gdImageCreateFromGd2Ctx); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Data is not in a recognized format"); + php_error_docref(NULL, E_WARNING, "Data is not in a recognized format"); RETURN_FALSE; } if (!im) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't create GD Image Stream out of Data"); + php_error_docref(NULL, E_WARNING, "Couldn't create GD Image Stream out of Data"); RETURN_FALSE; } @@ -2347,15 +2346,15 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, #endif if (image_type == PHP_GDIMG_TYPE_GD2PART) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sllll", &file, &file_len, &srcx, &srcy, &width, &height) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sllll", &file, &file_len, &srcx, &srcy, &width, &height) == FAILURE) { return; } if (width < 1 || height < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Zero width or height not allowed"); + php_error_docref(NULL, E_WARNING, "Zero width or height not allowed"); RETURN_FALSE; } } else { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file, &file_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &file, &file_len) == FAILURE) { return; } } @@ -2380,7 +2379,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, buff = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0); if (!buff) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot read image data"); + php_error_docref(NULL, E_WARNING,"Cannot read image data"); goto out_err; } @@ -2390,7 +2389,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, if (!io_ctx) { pefree(pstr, 1); zend_string_release(buff); - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot allocate GD IO context"); + php_error_docref(NULL, E_WARNING,"Cannot allocate GD IO context"); goto out_err; } @@ -2443,7 +2442,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, return; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s' is not a valid %s file", file, tn); + php_error_docref(NULL, E_WARNING, "'%s' is not a valid %s file", file, tn); out_err: php_stream_close(stream); RETURN_FALSE; @@ -2557,7 +2556,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char /* When called from imagewbmp() the quality parameter stands for the foreground color. Default: black. */ /* The quality parameter for gd2 stands for chunk size */ - if (zend_parse_parameters(argc TSRMLS_CC, "r|pll", &imgind, &file, &file_len, &quality, &type) == FAILURE) { + if (zend_parse_parameters(argc, "r|pll", &imgind, &file, &file_len, &quality, &type) == FAILURE) { return; } @@ -2578,7 +2577,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char fp = VCWD_FOPEN(fn, "wb"); if (!fp) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open '%s' for writing", fn); + php_error_docref(NULL, E_WARNING, "Unable to open '%s' for writing", fn); RETURN_FALSE; } @@ -2587,7 +2586,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char if (q == -1) { q = 0; } else if (q < 0 || q > 255) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); + php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); q = 0; } gdImageWBMP(im, q, fp); @@ -2628,9 +2627,9 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char char buf[4096]; char *path; - tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC); + tmp = php_open_temporary_file(NULL, NULL, &path); if (tmp == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); + php_error_docref(NULL, E_WARNING, "Unable to open temporary file"); RETURN_FALSE; } @@ -2639,7 +2638,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char if (q == -1) { q = 0; } else if (q < 0 || q > 255) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); + php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); q = 0; } gdImageWBMP(im, q, tmp); @@ -2681,7 +2680,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0); #endif while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) { - php_write(buf, b TSRMLS_CC); + php_write(buf, b); } fclose(tmp); @@ -2771,7 +2770,7 @@ PHP_FUNCTION(imagedestroy) zval *IM; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } @@ -2793,7 +2792,7 @@ PHP_FUNCTION(imagecolorallocate) gdImagePtr im; int ct = (-1); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &red, &green, &blue) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &red, &green, &blue) == FAILURE) { return; } @@ -2814,7 +2813,7 @@ PHP_FUNCTION(imagepalettecopy) zval *dstim, *srcim; gdImagePtr dst, src; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &dstim, &srcim) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &dstim, &srcim) == FAILURE) { return; } @@ -2833,7 +2832,7 @@ PHP_FUNCTION(imagecolorat) zend_long x, y; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &IM, &x, &y) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll", &IM, &x, &y) == FAILURE) { return; } @@ -2843,14 +2842,14 @@ PHP_FUNCTION(imagecolorat) if (im->tpixels && gdImageBoundsSafe(im, x, y)) { RETURN_LONG(gdImageTrueColorPixel(im, x, y)); } else { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%pd,%pd is out of bounds", x, y); + php_error_docref(NULL, E_NOTICE, "%pd,%pd is out of bounds", x, y); RETURN_FALSE; } } else { if (im->pixels && gdImageBoundsSafe(im, x, y)) { RETURN_LONG(im->pixels[y][x]); } else { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%pd,%pd is out of bounds", x, y); + php_error_docref(NULL, E_NOTICE, "%pd,%pd is out of bounds", x, y); RETURN_FALSE; } } @@ -2865,7 +2864,7 @@ PHP_FUNCTION(imagecolorclosest) zend_long red, green, blue; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &red, &green, &blue) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &red, &green, &blue) == FAILURE) { return; } @@ -2883,7 +2882,7 @@ PHP_FUNCTION(imagecolorclosesthwb) zend_long red, green, blue; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &red, &green, &blue) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &red, &green, &blue) == FAILURE) { return; } @@ -2902,7 +2901,7 @@ PHP_FUNCTION(imagecolordeallocate) int col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &IM, &index) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &IM, &index) == FAILURE) { return; } @@ -2919,7 +2918,7 @@ PHP_FUNCTION(imagecolordeallocate) gdImageColorDeallocate(im, col); RETURN_TRUE; } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Color index %d out of range", col); + php_error_docref(NULL, E_WARNING, "Color index %d out of range", col); RETURN_FALSE; } } @@ -2933,7 +2932,7 @@ PHP_FUNCTION(imagecolorresolve) zend_long red, green, blue; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &red, &green, &blue) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &red, &green, &blue) == FAILURE) { return; } @@ -2951,7 +2950,7 @@ PHP_FUNCTION(imagecolorexact) zend_long red, green, blue; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &red, &green, &blue) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &red, &green, &blue) == FAILURE) { return; } @@ -2970,7 +2969,7 @@ PHP_FUNCTION(imagecolorset) int col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll|l", &IM, &color, &red, &green, &blue, &alpha) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll|l", &IM, &color, &red, &green, &blue, &alpha) == FAILURE) { return; } @@ -2998,7 +2997,7 @@ PHP_FUNCTION(imagecolorsforindex) int col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &IM, &index) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &IM, &index) == FAILURE) { return; } @@ -3014,7 +3013,7 @@ PHP_FUNCTION(imagecolorsforindex) add_assoc_long(return_value,"blue", gdImageBlue(im,col)); add_assoc_long(return_value,"alpha", gdImageAlpha(im,col)); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Color index %d out of range", col); + php_error_docref(NULL, E_WARNING, "Color index %d out of range", col); RETURN_FALSE; } } @@ -3029,7 +3028,7 @@ PHP_FUNCTION(imagegammacorrect) int i; double input, output; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rdd", &IM, &input, &output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rdd", &IM, &input, &output) == FAILURE) { return; } @@ -3071,7 +3070,7 @@ PHP_FUNCTION(imagesetpixel) zend_long x, y, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &x, &y, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &x, &y, &col) == FAILURE) { return; } @@ -3089,7 +3088,7 @@ PHP_FUNCTION(imageline) zend_long x1, y1, x2, y2, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { return; } @@ -3115,7 +3114,7 @@ PHP_FUNCTION(imagedashedline) zend_long x1, y1, x2, y2, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { return; } @@ -3133,7 +3132,7 @@ PHP_FUNCTION(imagerectangle) zend_long x1, y1, x2, y2, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { return; } @@ -3151,7 +3150,7 @@ PHP_FUNCTION(imagefilledrectangle) zend_long x1, y1, x2, y2, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllll", &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) { return; } @@ -3170,7 +3169,7 @@ PHP_FUNCTION(imagearc) gdImagePtr im; int e, st; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col) == FAILURE) { return; } @@ -3199,7 +3198,7 @@ PHP_FUNCTION(imageellipse) zend_long cx, cy, w, h, color; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllll", &IM, &cx, &cy, &w, &h, &color) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllll", &IM, &cx, &cy, &w, &h, &color) == FAILURE) { return; } @@ -3218,7 +3217,7 @@ PHP_FUNCTION(imagefilltoborder) zend_long x, y, border, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &x, &y, &border, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll", &IM, &x, &y, &border, &col) == FAILURE) { return; } @@ -3236,7 +3235,7 @@ PHP_FUNCTION(imagefill) zend_long x, y, col; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlll", &IM, &x, &y, &col) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlll", &IM, &x, &y, &col) == FAILURE) { return; } @@ -3253,7 +3252,7 @@ PHP_FUNCTION(imagecolorstotal) zval *IM; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } @@ -3272,7 +3271,7 @@ PHP_FUNCTION(imagecolortransparent) gdImagePtr im; int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "r|l", &IM, &COL) == FAILURE) { + if (zend_parse_parameters(argc, "r|l", &IM, &COL) == FAILURE) { return; } @@ -3295,7 +3294,7 @@ PHP_FUNCTION(imageinterlace) zend_long INT = 0; gdImagePtr im; - if (zend_parse_parameters(argc TSRMLS_CC, "r|l", &IM, &INT) == FAILURE) { + if (zend_parse_parameters(argc, "r|l", &IM, &INT) == FAILURE) { return; } @@ -3322,7 +3321,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) gdPointPtr points; int npoints, col, nelem, i; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rall", &IM, &POINTS, &NPOINTS, &COL) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rall", &IM, &POINTS, &NPOINTS, &COL) == FAILURE) { return; } @@ -3333,15 +3332,15 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) nelem = zend_hash_num_elements(Z_ARRVAL_P(POINTS)); if (nelem < 6) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must have at least 3 points in your array"); + php_error_docref(NULL, E_WARNING, "You must have at least 3 points in your array"); RETURN_FALSE; } if (npoints <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must give a positive number of points"); + php_error_docref(NULL, E_WARNING, "You must give a positive number of points"); RETURN_FALSE; } if (nelem < npoints * 2) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Trying to use %d points in array with only %d points", npoints, nelem/2); + php_error_docref(NULL, E_WARNING, "Trying to use %d points in array with only %d points", npoints, nelem/2); RETURN_FALSE; } @@ -3385,7 +3384,7 @@ PHP_FUNCTION(imagefilledpolygon) /* {{{ php_find_gd_font */ -static gdFontPtr php_find_gd_font(int size TSRMLS_DC) +static gdFontPtr php_find_gd_font(int size) { gdFontPtr font; @@ -3433,11 +3432,11 @@ static void php_imagefontsize(INTERNAL_FUNCTION_PARAMETERS, int arg) zend_long SIZE; gdFontPtr font; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &SIZE) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &SIZE) == FAILURE) { return; } - font = php_find_gd_font(SIZE TSRMLS_CC); + font = php_find_gd_font(SIZE); RETURN_LONG(arg ? font->h : font->w); } /* }}} */ @@ -3501,7 +3500,7 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode) unsigned char *str = NULL; gdFontPtr font; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlllsl", &IM, &SIZE, &X, &Y, &C, &C_len, &COL) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlllsl", &IM, &SIZE, &X, &Y, &C, &C_len, &COL) == FAILURE) { return; } @@ -3520,7 +3519,7 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode) x = X; size = SIZE; - font = php_find_gd_font(size TSRMLS_CC); + font = php_find_gd_font(size); switch (mode) { case 0: @@ -3592,7 +3591,7 @@ PHP_FUNCTION(imagecopy) gdImagePtr im_dst, im_src; int srcH, srcW, srcY, srcX, dstY, dstX; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH) == FAILURE) { return; } @@ -3620,7 +3619,7 @@ PHP_FUNCTION(imagecopymerge) gdImagePtr im_dst, im_src; int srcH, srcW, srcY, srcX, dstY, dstX, pct; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrlllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH, &PCT) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrlllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH, &PCT) == FAILURE) { return; } @@ -3649,7 +3648,7 @@ PHP_FUNCTION(imagecopymergegray) gdImagePtr im_dst, im_src; int srcH, srcW, srcY, srcX, dstY, dstX, pct; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrlllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH, &PCT) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrlllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH, &PCT) == FAILURE) { return; } @@ -3678,7 +3677,7 @@ PHP_FUNCTION(imagecopyresized) gdImagePtr im_dst, im_src; int srcH, srcW, dstH, dstW, srcY, srcX, dstY, dstX; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrllllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &DW, &DH, &SW, &SH) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrllllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &DW, &DH, &SW, &SH) == FAILURE) { return; } @@ -3695,7 +3694,7 @@ PHP_FUNCTION(imagecopyresized) dstW = DW; if (dstW <= 0 || dstH <= 0 || srcW <= 0 || srcH <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid image dimensions"); + php_error_docref(NULL, E_WARNING, "Invalid image dimensions"); RETURN_FALSE; } @@ -3711,7 +3710,7 @@ PHP_FUNCTION(imagesx) zval *IM; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } @@ -3728,7 +3727,7 @@ PHP_FUNCTION(imagesy) zval *IM; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &IM) == FAILURE) { return; } @@ -3797,13 +3796,13 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int if (mode == TTFTEXT_BBOX) { if (argc < 4 || argc > ((extended) ? 5 : 4)) { ZEND_WRONG_PARAM_COUNT(); - } else if (zend_parse_parameters(argc TSRMLS_CC, "ddss|a", &ptsize, &angle, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) { + } else if (zend_parse_parameters(argc, "ddss|a", &ptsize, &angle, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) { RETURN_FALSE; } } else { if (argc < 8 || argc > ((extended) ? 9 : 8)) { ZEND_WRONG_PARAM_COUNT(); - } else if (zend_parse_parameters(argc TSRMLS_CC, "rddlllss|a", &IM, &ptsize, &angle, &x, &y, &col, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) { + } else if (zend_parse_parameters(argc, "rddlllss|a", &IM, &ptsize, &angle, &x, &y, &col, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) { RETURN_FALSE; } ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd); @@ -3851,7 +3850,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int #endif /* HAVE_GD_FREETYPE */ if (error) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", error); + php_error_docref(NULL, E_WARNING, "%s", error); RETURN_FALSE; } @@ -3869,7 +3868,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int /* {{{ php_free_ps_font */ -static void php_free_ps_font(zend_resource *rsrc TSRMLS_DC) +static void php_free_ps_font(zend_resource *rsrc) { int *font = (int *)rsrc->ptr; @@ -3880,7 +3879,7 @@ static void php_free_ps_font(zend_resource *rsrc TSRMLS_DC) /* {{{ php_free_ps_enc */ -static void php_free_ps_enc(zend_resource *rsrc TSRMLS_DC) +static void php_free_ps_enc(zend_resource *rsrc) { char **enc = (char **)rsrc->ptr; @@ -3898,13 +3897,13 @@ PHP_FUNCTION(imagepsloadfont) zend_stat_t st; #endif - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file, &file_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &file, &file_len) == FAILURE) { return; } #ifdef PHP_WIN32 if (VCWD_STAT(file, &st) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Font file not found (%s)", file); + php_error_docref(NULL, E_WARNING, "Font file not found (%s)", file); RETURN_FALSE; } #endif @@ -3912,12 +3911,12 @@ PHP_FUNCTION(imagepsloadfont) f_ind = T1_AddFont(file); if (f_ind < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "T1Lib Error (%i): %s", f_ind, T1_StrError(f_ind)); + php_error_docref(NULL, E_WARNING, "T1Lib Error (%i): %s", f_ind, T1_StrError(f_ind)); RETURN_FALSE; } if (T1_LoadFont(f_ind)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't load the font"); + php_error_docref(NULL, E_WARNING, "Couldn't load the font"); RETURN_FALSE; } @@ -3936,14 +3935,14 @@ PHP_FUNCTION(imagepscopyfont) gd_ps_font *nf_ind, *of_ind; long fnt; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &fnt) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &fnt) == FAILURE) { return; } of_ind = zend_list_find(fnt, &type); if (type != le_ps_font) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a Type 1 font index", fnt); + php_error_docref(NULL, E_WARNING, "%ld is not a Type 1 font index", fnt); RETURN_FALSE; } @@ -3955,26 +3954,26 @@ PHP_FUNCTION(imagepscopyfont) efree(nf_ind); switch (l_ind) { case -1: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "FontID %d is not loaded in memory", l_ind); + php_error_docref(NULL, E_WARNING, "FontID %d is not loaded in memory", l_ind); RETURN_FALSE; break; case -2: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to copy a logical font"); + php_error_docref(NULL, E_WARNING, "Tried to copy a logical font"); RETURN_FALSE; break; case -3: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Memory allocation fault in t1lib"); + php_error_docref(NULL, E_WARNING, "Memory allocation fault in t1lib"); RETURN_FALSE; break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "An unknown error occurred in t1lib"); + php_error_docref(NULL, E_WARNING, "An unknown error occurred in t1lib"); RETURN_FALSE; break; } } nf_ind->extend = 1; - l_ind = zend_list_insert(nf_ind, le_ps_font TSRMLS_CC); + l_ind = zend_list_insert(nf_ind, le_ps_font); RETURN_LONG(l_ind); } */ @@ -3987,7 +3986,7 @@ PHP_FUNCTION(imagepsfreefont) zval *fnt; int *f_ind; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &fnt) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &fnt) == FAILURE) { return; } @@ -4005,25 +4004,25 @@ PHP_FUNCTION(imagepsencodefont) char *enc, **enc_vector; size_t enc_len, *f_ind; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &fnt, &enc, &enc_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &fnt, &enc, &enc_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(f_ind, int *, fnt, -1, "Type 1 font", le_ps_font); if ((enc_vector = T1_LoadEncoding(enc)) == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't load encoding vector from %s", enc); + php_error_docref(NULL, E_WARNING, "Couldn't load encoding vector from %s", enc); RETURN_FALSE; } T1_DeleteAllSizes(*f_ind); if (T1_ReencodeFont(*f_ind, enc_vector)) { T1_DeleteEncoding(enc_vector); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't re-encode font"); + php_error_docref(NULL, E_WARNING, "Couldn't re-encode font"); RETURN_FALSE; } - zend_list_insert(enc_vector, le_ps_enc TSRMLS_CC); + zend_list_insert(enc_vector, le_ps_enc); RETURN_TRUE; } @@ -4037,7 +4036,7 @@ PHP_FUNCTION(imagepsextendfont) double ext; int *f_ind; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rd", &fnt, &ext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rd", &fnt, &ext) == FAILURE) { return; } @@ -4046,7 +4045,7 @@ PHP_FUNCTION(imagepsextendfont) T1_DeleteAllSizes(*f_ind); if (ext <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second parameter %F out of range (must be > 0)", ext); + php_error_docref(NULL, E_WARNING, "Second parameter %F out of range (must be > 0)", ext); RETURN_FALSE; } @@ -4066,7 +4065,7 @@ PHP_FUNCTION(imagepsslantfont) double slt; int *f_ind; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rd", &fnt, &slt) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rd", &fnt, &slt) == FAILURE) { return; } @@ -4102,12 +4101,12 @@ PHP_FUNCTION(imagepstext) char *str; int str_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsrlllll|lldl", &img, &str, &str_len, &fnt, &size, &_fg, &_bg, &x, &y, &space, &width, &angle, &aa_steps) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsrlllll|lldl", &img, &str, &str_len, &fnt, &size, &_fg, &_bg, &x, &y, &space, &width, &angle, &aa_steps) == FAILURE) { return; } if (aa_steps != 4 && aa_steps != 16) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Antialias steps must be 4 or 16"); + php_error_docref(NULL, E_WARNING, "Antialias steps must be 4 or 16"); RETURN_FALSE; } @@ -4116,12 +4115,12 @@ PHP_FUNCTION(imagepstext) /* Ensure that the provided colors are valid */ if (_fg < 0 || (!gdImageTrueColor(bg_img) && _fg > gdImageColorsTotal(bg_img))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Foreground color index %pd out of range", _fg); + php_error_docref(NULL, E_WARNING, "Foreground color index %pd out of range", _fg); RETURN_FALSE; } if (_bg < 0 || (!gdImageTrueColor(bg_img) && _fg > gdImageColorsTotal(bg_img))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Background color index %pd out of range", _bg); + php_error_docref(NULL, E_WARNING, "Background color index %pd out of range", _bg); RETURN_FALSE; } @@ -4155,7 +4154,7 @@ PHP_FUNCTION(imagepstext) T1_AASetLevel(T1_AA_HIGH); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value %pd as number of steps for antialiasing", aa_steps); + php_error_docref(NULL, E_WARNING, "Invalid value %pd as number of steps for antialiasing", aa_steps); RETURN_FALSE; } @@ -4169,7 +4168,7 @@ PHP_FUNCTION(imagepstext) if (!str_path) { if (T1_errno) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "T1Lib Error: %s", T1_StrError(T1_errno)); + php_error_docref(NULL, E_WARNING, "T1Lib Error: %s", T1_StrError(T1_errno)); } RETURN_FALSE; } @@ -4190,7 +4189,7 @@ PHP_FUNCTION(imagepstext) str_img = T1_AASetString(*f_ind, str, str_len, space, T1_KERNING, size, transform); } if (T1_errno) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "T1Lib Error: %s", T1_StrError(T1_errno)); + php_error_docref(NULL, E_WARNING, "T1Lib Error: %s", T1_StrError(T1_errno)); RETURN_FALSE; } @@ -4239,7 +4238,7 @@ PHP_FUNCTION(imagepsbbox) ZEND_WRONG_PARAM_COUNT(); } - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "srl|lld", &str, &str_len, &fnt, &sz, &sp, &wd, &angle) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "srl|lld", &str, &str_len, &fnt, &sz, &sp, &wd, &angle) == FAILURE) { return; } @@ -4357,23 +4356,22 @@ static void _php_image_bw_convert(gdImagePtr im_org, gdIOCtx *out, int threshold int dest_height = gdImageSY(im_org); int dest_width = gdImageSX(im_org); int x, y; - TSRMLS_FETCH(); im_dest = gdImageCreate(dest_width, dest_height); if (im_dest == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate temporary buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate temporary buffer"); return; } white = gdImageColorAllocate(im_dest, 255, 255, 255); if (white == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate the colors for the destination buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate the colors for the destination buffer"); return; } black = gdImageColorAllocate(im_dest, 0, 0, 0); if (black == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate the colors for the destination buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate the colors for the destination buffer"); return; } @@ -4421,7 +4419,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) zend_long ignore_warning; #endif - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pplll", &f_org, &f_org_len, &f_dest, &f_dest_len, &height, &width, &threshold) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "pplll", &f_org, &f_org_len, &f_dest, &f_dest_len, &height, &width, &threshold) == FAILURE) { return; } @@ -4433,7 +4431,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) /* Check threshold value */ if (int_threshold < 0 || int_threshold > 8) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'", int_threshold); + php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'", int_threshold); RETURN_FALSE; } @@ -4446,14 +4444,14 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) /* Open origin file */ org = VCWD_FOPEN(fn_org, "rb"); if (!org) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open '%s' for reading", fn_org); + php_error_docref(NULL, E_WARNING, "Unable to open '%s' for reading", fn_org); RETURN_FALSE; } /* Open destination file */ dest = VCWD_FOPEN(fn_dest, "wb"); if (!dest) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open '%s' for writing", fn_dest); + php_error_docref(NULL, E_WARNING, "Unable to open '%s' for writing", fn_dest); RETURN_FALSE; } @@ -4461,7 +4459,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) case PHP_GDIMG_TYPE_GIF: im_org = gdImageCreateFromGif(org); if (im_org == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open '%s' Not a valid GIF file", fn_dest); + php_error_docref(NULL, E_WARNING, "Unable to open '%s' Not a valid GIF file", fn_dest); RETURN_FALSE; } break; @@ -4471,7 +4469,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) ignore_warning = INI_INT("gd.jpeg_ignore_warning"); im_org = gdImageCreateFromJpegEx(org, ignore_warning); if (im_org == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open '%s' Not a valid JPEG file", fn_dest); + php_error_docref(NULL, E_WARNING, "Unable to open '%s' Not a valid JPEG file", fn_dest); RETURN_FALSE; } break; @@ -4481,14 +4479,14 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) case PHP_GDIMG_TYPE_PNG: im_org = gdImageCreateFromPng(org); if (im_org == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open '%s' Not a valid PNG file", fn_dest); + php_error_docref(NULL, E_WARNING, "Unable to open '%s' Not a valid PNG file", fn_dest); RETURN_FALSE; } break; #endif /* HAVE_GD_PNG */ default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Format not supported"); + php_error_docref(NULL, E_WARNING, "Format not supported"); RETURN_FALSE; break; } @@ -4522,7 +4520,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) im_tmp = gdImageCreate (dest_width, dest_height); if (im_tmp == NULL ) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate temporary buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate temporary buffer"); RETURN_FALSE; } @@ -4534,19 +4532,19 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) im_dest = gdImageCreate(dest_width, dest_height); if (im_dest == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate destination buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate destination buffer"); RETURN_FALSE; } white = gdImageColorAllocate(im_dest, 255, 255, 255); if (white == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate the colors for the destination buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate the colors for the destination buffer"); RETURN_FALSE; } black = gdImageColorAllocate(im_dest, 0, 0, 0); if (black == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate the colors for the destination buffer"); + php_error_docref(NULL, E_WARNING, "Unable to allocate the colors for the destination buffer"); RETURN_FALSE; } @@ -4582,7 +4580,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) #define PHP_GD_SINGLE_RES \ zval *SIM; \ gdImagePtr im_src; \ - if (zend_parse_parameters(1 TSRMLS_CC, "r", &SIM) == FAILURE) { \ + if (zend_parse_parameters(1, "r", &SIM) == FAILURE) { \ RETURN_FALSE; \ } \ ZEND_FETCH_RESOURCE(im_src, gdImagePtr, SIM, -1, "Image", le_gd); \ @@ -4618,7 +4616,7 @@ static void php_image_filter_brightness(INTERNAL_FUNCTION_PARAMETERS) gdImagePtr im_src; zend_long brightness, tmp; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zll", &SIM, &tmp, &brightness) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zll", &SIM, &tmp, &brightness) == FAILURE) { RETURN_FALSE; } @@ -4641,7 +4639,7 @@ static void php_image_filter_contrast(INTERNAL_FUNCTION_PARAMETERS) gdImagePtr im_src; zend_long contrast, tmp; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &SIM, &tmp, &contrast) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll", &SIM, &tmp, &contrast) == FAILURE) { RETURN_FALSE; } @@ -4665,7 +4663,7 @@ static void php_image_filter_colorize(INTERNAL_FUNCTION_PARAMETERS) zend_long r,g,b,tmp; zend_long a = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll|l", &SIM, &tmp, &r, &g, &b, &a) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rllll|l", &SIM, &tmp, &r, &g, &b, &a) == FAILURE) { RETURN_FALSE; } @@ -4744,7 +4742,7 @@ static void php_image_filter_smooth(INTERNAL_FUNCTION_PARAMETERS) gdImagePtr im_src; double weight; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rld", &SIM, &tmp, &weight) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rld", &SIM, &tmp, &weight) == FAILURE) { RETURN_FALSE; } @@ -4768,7 +4766,7 @@ static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS) zend_long tmp, blocksize; zend_bool mode = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll|b", &IM, &tmp, &blocksize, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll|b", &IM, &tmp, &blocksize, &mode) == FAILURE) { RETURN_FALSE; } @@ -4811,7 +4809,7 @@ PHP_FUNCTION(imagefilter) if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > IMAGE_FILTER_MAX_ARGS) { WRONG_PARAM_COUNT; - } else if (zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) { + } else if (zend_parse_parameters(2, "rl", &tmp, &filtertype) == FAILURE) { return; } @@ -4832,7 +4830,7 @@ PHP_FUNCTION(imageconvolution) int nelem, i, j, res; float matrix[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "radd", &SIM, &hash_matrix, &div, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "radd", &SIM, &hash_matrix, &div, &offset) == FAILURE) { RETURN_FALSE; } @@ -4840,14 +4838,14 @@ PHP_FUNCTION(imageconvolution) nelem = zend_hash_num_elements(Z_ARRVAL_P(hash_matrix)); if (nelem != 3) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must have 3x3 array"); + php_error_docref(NULL, E_WARNING, "You must have 3x3 array"); RETURN_FALSE; } 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 ) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must have 3x3 array"); + php_error_docref(NULL, E_WARNING, "You must have 3x3 array"); RETURN_FALSE; } @@ -4855,7 +4853,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 { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must have a 3x3 matrix"); + php_error_docref(NULL, E_WARNING, "You must have a 3x3 matrix"); RETURN_FALSE; } } @@ -4880,7 +4878,7 @@ PHP_FUNCTION(imageflip) zend_long mode; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &IM, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &IM, &mode) == FAILURE) { return; } @@ -4900,7 +4898,7 @@ PHP_FUNCTION(imageflip) break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown flip mode"); + php_error_docref(NULL, E_WARNING, "Unknown flip mode"); RETURN_FALSE; } @@ -4917,7 +4915,7 @@ PHP_FUNCTION(imageantialias) zend_bool alias; gdImagePtr im; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &IM, &alias) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &IM, &alias) == FAILURE) { return; } @@ -4939,7 +4937,7 @@ PHP_FUNCTION(imagecrop) zval *z_rect; zval *tmp; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra", &IM, &z_rect) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &IM, &z_rect) == FAILURE) { return; } @@ -4948,28 +4946,28 @@ PHP_FUNCTION(imagecrop) if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "x", sizeof("x") -1)) != NULL) { rect.x = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing x position"); + php_error_docref(NULL, E_WARNING, "Missing x position"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "y", sizeof("y") - 1)) != NULL) { rect.y = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing y position"); + php_error_docref(NULL, E_WARNING, "Missing y position"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "width", sizeof("width") - 1)) != NULL) { rect.width = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing width"); + php_error_docref(NULL, E_WARNING, "Missing width"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "height", sizeof("height") - 1)) != NULL) { rect.height = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing height"); + php_error_docref(NULL, E_WARNING, "Missing height"); RETURN_FALSE; } @@ -4994,7 +4992,7 @@ PHP_FUNCTION(imagecropauto) gdImagePtr im; gdImagePtr im_crop; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ldl", &IM, &mode, &threshold, &color) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ldl", &IM, &mode, &threshold, &color) == FAILURE) { return; } @@ -5013,14 +5011,14 @@ PHP_FUNCTION(imagecropauto) case GD_CROP_THRESHOLD: if (color < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Color argument missing with threshold mode"); + php_error_docref(NULL, E_WARNING, "Color argument missing with threshold mode"); RETURN_FALSE; } im_crop = gdImageCropThreshold(im, color, (float) threshold); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown crop mode"); + php_error_docref(NULL, E_WARNING, "Unknown crop mode"); RETURN_FALSE; } if (im_crop == NULL) { @@ -5042,7 +5040,7 @@ PHP_FUNCTION(imagescale) zend_long tmp_w, tmp_h=-1, tmp_m = GD_BILINEAR_FIXED; gdInterpolationMethod method; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &tmp_w, &tmp_h, &tmp_m) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|ll", &IM, &tmp_w, &tmp_h, &tmp_m) == FAILURE) { return; } method = tmp_m; @@ -5091,14 +5089,14 @@ PHP_FUNCTION(imageaffine) int i, nelems; zval *zval_affine_elem = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|a", &IM, &z_affine, &z_rect) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra|a", &IM, &z_affine, &z_rect) == FAILURE) { return; } ZEND_FETCH_RESOURCE(src, gdImagePtr, IM, -1, "Image", le_gd); if ((nelems = zend_hash_num_elements(Z_ARRVAL_P(z_affine))) != 6) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Affine array must have six elements"); + php_error_docref(NULL, E_WARNING, "Affine array must have six elements"); RETURN_FALSE; } @@ -5115,7 +5113,7 @@ PHP_FUNCTION(imageaffine) affine[i] = zval_get_double(zval_affine_elem); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid type for element %i", i); + php_error_docref(NULL, E_WARNING, "Invalid type for element %i", i); RETURN_FALSE; } } @@ -5125,28 +5123,28 @@ PHP_FUNCTION(imageaffine) if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "x", sizeof("x") - 1)) != NULL) { rect.x = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing x position"); + php_error_docref(NULL, E_WARNING, "Missing x position"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "y", sizeof("y") - 1)) != NULL) { rect.y = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing y position"); + php_error_docref(NULL, E_WARNING, "Missing y position"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "width", sizeof("width") - 1)) != NULL) { rect.width = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing width"); + php_error_docref(NULL, E_WARNING, "Missing width"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "height", sizeof("height") - 1)) != NULL) { rect.height = zval_get_long(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing height"); + php_error_docref(NULL, E_WARNING, "Missing height"); RETURN_FALSE; } pRect = ▭ @@ -5180,7 +5178,7 @@ PHP_FUNCTION(imageaffinematrixget) zval *tmp; int res = GD_FALSE, i; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|z", &type, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z", &type, &options) == FAILURE) { return; } @@ -5189,20 +5187,20 @@ PHP_FUNCTION(imageaffinematrixget) case GD_AFFINE_SCALE: { double x, y; if (!options || Z_TYPE_P(options) != IS_ARRAY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array expected as options"); + php_error_docref(NULL, E_WARNING, "Array expected as options"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(options), "x", sizeof("x") - 1)) != NULL) { x = zval_get_double(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing x position"); + php_error_docref(NULL, E_WARNING, "Missing x position"); RETURN_FALSE; } if ((tmp = zend_hash_str_find(HASH_OF(options), "y", sizeof("y") - 1)) != NULL) { y = zval_get_double(tmp); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing y position"); + php_error_docref(NULL, E_WARNING, "Missing y position"); RETURN_FALSE; } @@ -5220,7 +5218,7 @@ PHP_FUNCTION(imageaffinematrixget) double angle; if (!options) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number is expected as option"); + php_error_docref(NULL, E_WARNING, "Number is expected as option"); RETURN_FALSE; } @@ -5237,7 +5235,7 @@ PHP_FUNCTION(imageaffinematrixget) } default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid type for element %li", type); + php_error_docref(NULL, E_WARNING, "Invalid type for element %li", type); RETURN_FALSE; } @@ -5264,12 +5262,12 @@ PHP_FUNCTION(imageaffinematrixconcat) zval *z_m2; int i, nelems; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "aa", &z_m1, &z_m2) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "aa", &z_m1, &z_m2) == FAILURE) { return; } if (((nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m1))) != 6) || (nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m2))) != 6) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Affine arrays must have six elements"); + php_error_docref(NULL, E_WARNING, "Affine arrays must have six elements"); RETURN_FALSE; } @@ -5286,7 +5284,7 @@ PHP_FUNCTION(imageaffinematrixconcat) m1[i] = zval_get_double(tmp); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid type for element %i", i); + php_error_docref(NULL, E_WARNING, "Invalid type for element %i", i); RETURN_FALSE; } } @@ -5302,7 +5300,7 @@ PHP_FUNCTION(imageaffinematrixconcat) m2[i] = zval_get_double(tmp); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid type for element %i", i); + php_error_docref(NULL, E_WARNING, "Invalid type for element %i", i); RETURN_FALSE; } } @@ -5326,7 +5324,7 @@ PHP_FUNCTION(imagesetinterpolation) gdImagePtr im; zend_long method = GD_BILINEAR_FIXED; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &IM, &method) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &IM, &method) == FAILURE) { return; } diff --git a/ext/gd/gd_compat.c b/ext/gd/gd_compat.c index dc6a95ae11..d6d8d0b2f9 100644 --- a/ext/gd/gd_compat.c +++ b/ext/gd/gd_compat.c @@ -48,14 +48,13 @@ const char * gdPngGetVersionString() int overflow2(int a, int b) { - TSRMLS_FETCH(); if(a <= 0 || b <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n"); + php_error_docref(NULL, E_WARNING, "gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n"); return 1; } if(a > INT_MAX / b) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); + php_error_docref(NULL, E_WARNING, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); return 1; } return 0; diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 0b79cb6f0d..0d4a25b13c 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -29,14 +29,12 @@ static void _php_image_output_putc(struct gdIOCtx *ctx, int c) /* {{{ */ * big endian architectures: */ unsigned char ch = (unsigned char) c; - TSRMLS_FETCH(); - php_write(&ch, 1 TSRMLS_CC); + php_write(&ch, 1); } /* }}} */ static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l) /* {{{ */ { - TSRMLS_FETCH(); - return php_write((void *)buf, l TSRMLS_CC); + return php_write((void *)buf, l); } /* }}} */ static void _php_image_output_ctxfree(struct gdIOCtx *ctx) /* {{{ */ @@ -49,20 +47,17 @@ static void _php_image_output_ctxfree(struct gdIOCtx *ctx) /* {{{ */ static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) /* {{{ */ { char ch = (char) c; php_stream * stream = (php_stream *)ctx->data; - TSRMLS_FETCH(); php_stream_write(stream, &ch, 1); } /* }}} */ static int _php_image_stream_putbuf(struct gdIOCtx *ctx, const void* buf, int l) /* {{{ */ { php_stream * stream = (php_stream *)ctx->data; - TSRMLS_FETCH(); return php_stream_write(stream, (void *)buf, l); } /* }}} */ static void _php_image_stream_ctxfree(struct gdIOCtx *ctx) /* {{{ */ { - TSRMLS_FETCH(); if(ctx->data) { php_stream_close((php_stream *) ctx->data); @@ -93,7 +88,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, * from imagey<type>(). */ if (image_type == PHP_GDIMG_TYPE_XBM) { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rp!|ll", &imgind, &file, &file_len, &quality, &basefilter) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rp!|ll", &imgind, &file, &file_len, &quality, &basefilter) == FAILURE) { return; } } else { @@ -103,7 +98,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, * PHP_GDIMG_TYPE_WBM * PHP_GDIMG_TYPE_WEBP * */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|z/!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z/!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) { return; } } @@ -125,7 +120,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } } else if (Z_TYPE_P(to_zval) == IS_STRING) { if (CHECK_ZVAL_NULL_PATH(to_zval)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 2nd parameter, filename must not contain null bytes"); + php_error_docref(NULL, E_WARNING, "Invalid 2nd parameter, filename must not contain null bytes"); RETURN_FALSE; } @@ -134,7 +129,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, RETURN_FALSE; } } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid 2nd parameter, it must a filename or a stream"); + php_error_docref(NULL, E_WARNING, "Invalid 2nd parameter, it must a filename or a stream"); RETURN_FALSE; } } else { @@ -161,7 +156,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, switch(image_type) { case PHP_GDIMG_CONVERT_WBM: if(q<0||q>255) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); + php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); } case PHP_GDIMG_TYPE_JPG: (*func_p)(im, ctx, q); diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 54890bc177..59fcd3533a 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -102,10 +102,9 @@ void php_gd_error_ex(int type, const char *format, ...) { va_list args; - TSRMLS_FETCH(); va_start(args, format); - php_verror(NULL, "", type, format, args TSRMLS_CC); + php_verror(NULL, "", type, format, args); va_end(args); } @@ -113,10 +112,9 @@ void php_gd_error(const char *format, ...) { va_list args; - TSRMLS_FETCH(); va_start(args, format); - php_verror(NULL, "", E_WARNING, format, args TSRMLS_CC); + php_verror(NULL, "", E_WARNING, format, args); va_end(args); } diff --git a/ext/gd/libgd/gd_gif_in.c b/ext/gd/libgd/gd_gif_in.c index 491e9422db..f41ec8460a 100644 --- a/ext/gd/libgd/gd_gif_in.c +++ b/ext/gd/libgd/gd_gif_in.c @@ -400,14 +400,14 @@ GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroD scd->lastbit = (2+count)*8 ; } - ret = 0; - for (i = scd->curbit, j = 0; j < code_size; ++i, ++j) - if (i < CSD_BUF_SIZE * 8) { + if ((scd->curbit + code_size - 1) >= (CSD_BUF_SIZE * 8)) { + ret = -1; + } else { + ret = 0; + for (i = scd->curbit, j = 0; j < code_size; ++i, ++j) { ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j; - } else { - ret = -1; - break; } + } scd->curbit += code_size; return ret; diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index 763efcf68c..c967de6ffb 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -412,8 +412,7 @@ static void *fontFetch (char **error, void *key) for (dir = gd_strtok_r (path, PATHSEPARATOR, &strtok_ptr_path); dir; dir = gd_strtok_r (0, PATHSEPARATOR, &strtok_ptr_path)) { if (!strcmp(dir, ".")) { - TSRMLS_FETCH(); -#if HAVE_GETCWD + #if HAVE_GETCWD dir = VCWD_GETCWD(cur_dir, MAXPATHLEN); #elif HAVE_GETWD dir = VCWD_GETWD(cur_dir); diff --git a/ext/gd/libgd/gdkanji.c b/ext/gd/libgd/gdkanji.c index 37f3bd10a0..2f6110c532 100644 --- a/ext/gd/libgd/gdkanji.c +++ b/ext/gd/libgd/gdkanji.c @@ -74,12 +74,11 @@ error (const char *format,...) { va_list args; char *tmp; - TSRMLS_FETCH(); va_start(args, format); vspprintf(&tmp, 0, format, args); va_end(args); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: %s", LIBNAME, tmp); + php_error_docref(NULL, E_WARNING, "%s: %s", LIBNAME, tmp); efree(tmp); } diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 7510b2425d..0ae90ccf89 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -32,8 +32,8 @@ /* open_basedir and safe_mode checks */ #define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \ - if (!filename || php_check_open_basedir(filename TSRMLS_CC)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \ + if (!filename || php_check_open_basedir(filename)) { \ + php_error_docref(NULL, E_WARNING, errormsg); \ RETURN_FALSE; \ } diff --git a/ext/gd/tests/imagechar_error3.phpt b/ext/gd/tests/imagechar_error3.phpt index aec65e9cfa..31b1c2386f 100644 --- a/ext/gd/tests/imagechar_error3.phpt +++ b/ext/gd/tests/imagechar_error3.phpt @@ -14,4 +14,4 @@ $result = imagechar($image, 'string', 5, 5, 'C', 1); ?> --EXPECTF-- -Warning: imagechar() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagechar() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagechar_error4.phpt b/ext/gd/tests/imagechar_error4.phpt index a9485f7bb1..263da50e60 100644 --- a/ext/gd/tests/imagechar_error4.phpt +++ b/ext/gd/tests/imagechar_error4.phpt @@ -14,4 +14,4 @@ $result = imagechar($image, 1, 'string', 5, 'C', 1); ?> --EXPECTF-- -Warning: imagechar() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagechar() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagechar_error5.phpt b/ext/gd/tests/imagechar_error5.phpt index 8670d19472..8d47dc377b 100644 --- a/ext/gd/tests/imagechar_error5.phpt +++ b/ext/gd/tests/imagechar_error5.phpt @@ -14,4 +14,4 @@ $result = imagechar($image, 1, 5, 'string', 'C', 1); ?> --EXPECTF-- -Warning: imagechar() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagechar() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagechar_error7.phpt b/ext/gd/tests/imagechar_error7.phpt index fae23a71e7..1d7819265c 100644 --- a/ext/gd/tests/imagechar_error7.phpt +++ b/ext/gd/tests/imagechar_error7.phpt @@ -14,4 +14,4 @@ $result = imagechar($image, 1, 5, 5, 'C', 'font'); ?> --EXPECTF-- -Warning: imagechar() expects parameter 6 to be long, %s given in %s on line %d +Warning: imagechar() expects parameter 6 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagecharup_error3.phpt b/ext/gd/tests/imagecharup_error3.phpt index 7e811bade8..a44b766484 100644 --- a/ext/gd/tests/imagecharup_error3.phpt +++ b/ext/gd/tests/imagecharup_error3.phpt @@ -14,4 +14,4 @@ $result = imagecharup($image, 'string', 5, 5, 'C', 1); ?> --EXPECTF-- -Warning: imagecharup() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagecharup() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagecharup_error4.phpt b/ext/gd/tests/imagecharup_error4.phpt index f76fdaca8a..f1824f1344 100644 --- a/ext/gd/tests/imagecharup_error4.phpt +++ b/ext/gd/tests/imagecharup_error4.phpt @@ -14,4 +14,4 @@ $result = imagecharup($image, 1, 'string', 5, 'C', 1); ?> --EXPECTF-- -Warning: imagecharup() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagecharup() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagecharup_error5.phpt b/ext/gd/tests/imagecharup_error5.phpt index b56525933b..73c2d075fe 100644 --- a/ext/gd/tests/imagecharup_error5.phpt +++ b/ext/gd/tests/imagecharup_error5.phpt @@ -14,4 +14,4 @@ $result = imagecharup($image, 1, 5, 'string', 'C', 1); ?> --EXPECTF-- -Warning: imagecharup() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagecharup() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagecharup_error7.phpt b/ext/gd/tests/imagecharup_error7.phpt index b61189a542..fe1fe073da 100644 --- a/ext/gd/tests/imagecharup_error7.phpt +++ b/ext/gd/tests/imagecharup_error7.phpt @@ -14,4 +14,4 @@ $result = imagecharup($image, 1, 5, 5, 'C', 'font'); ?> --EXPECTF-- -Warning: imagecharup() expects parameter 6 to be long, %s given in %s on line %d +Warning: imagecharup() expects parameter 6 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagecolorallocate_variation1.phpt b/ext/gd/tests/imagecolorallocate_variation1.phpt index 552a0fc084..60d690bfbe 100644 --- a/ext/gd/tests/imagecolorallocate_variation1.phpt +++ b/ext/gd/tests/imagecolorallocate_variation1.phpt @@ -137,27 +137,27 @@ NULL -- float 10.5 -- -Warning: imagecolorallocate() expects parameter 1 to be resource, double given in %s on line %d +Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d NULL -- float -10.5 -- -Warning: imagecolorallocate() expects parameter 1 to be resource, double given in %s on line %d +Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d NULL -- float 10.1234567e10 -- -Warning: imagecolorallocate() expects parameter 1 to be resource, double given in %s on line %d +Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d NULL -- float 10.7654321E-10 -- -Warning: imagecolorallocate() expects parameter 1 to be resource, double given in %s on line %d +Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d NULL -- float .5 -- -Warning: imagecolorallocate() expects parameter 1 to be resource, double given in %s on line %d +Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d NULL -- empty array -- diff --git a/ext/gd/tests/imagecolorallocate_variation2.phpt b/ext/gd/tests/imagecolorallocate_variation2.phpt index bd9dc984d1..7de60bc19f 100644 --- a/ext/gd/tests/imagecolorallocate_variation2.phpt +++ b/ext/gd/tests/imagecolorallocate_variation2.phpt @@ -8,6 +8,7 @@ if(!extension_loaded('gd')) { if(!function_exists('imagecreatetruecolor')) { die('skip imagecreatetruecolor function is not available'); } +if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?> --FILE-- <?php @@ -125,22 +126,22 @@ int(2570) --empty array-- -Warning: imagecolorallocate() expects parameter 2 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, array given in %s on line %d NULL --int indexed array-- -Warning: imagecolorallocate() expects parameter 2 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, array given in %s on line %d NULL --associative array-- -Warning: imagecolorallocate() expects parameter 2 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, array given in %s on line %d NULL --nested arrays-- -Warning: imagecolorallocate() expects parameter 2 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, array given in %s on line %d NULL --uppercase NULL-- @@ -163,42 +164,42 @@ int(2570) --empty string DQ-- -Warning: imagecolorallocate() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, string given in %s on line %d NULL --empty string SQ-- -Warning: imagecolorallocate() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, string given in %s on line %d NULL --string DQ-- -Warning: imagecolorallocate() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, string given in %s on line %d NULL --string SQ-- -Warning: imagecolorallocate() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, string given in %s on line %d NULL --mixed case string-- -Warning: imagecolorallocate() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, string given in %s on line %d NULL --heredoc-- -Warning: imagecolorallocate() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, string given in %s on line %d NULL --instance of classWithToString-- -Warning: imagecolorallocate() expects parameter 2 to be long, object given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, object given in %s on line %d NULL --instance of classWithoutToString-- -Warning: imagecolorallocate() expects parameter 2 to be long, object given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, object given in %s on line %d NULL --undefined var-- @@ -209,6 +210,6 @@ int(2570) --file resource-- -Warning: imagecolorallocate() expects parameter 2 to be long, resource given in %s on line %d +Warning: imagecolorallocate() expects parameter 2 to be integer, resource given in %s on line %d NULL ===DONE=== diff --git a/ext/gd/tests/imagecolorallocate_variation3.phpt b/ext/gd/tests/imagecolorallocate_variation3.phpt index c48dc29cf5..3fe1f50f82 100644 --- a/ext/gd/tests/imagecolorallocate_variation3.phpt +++ b/ext/gd/tests/imagecolorallocate_variation3.phpt @@ -125,22 +125,22 @@ int(655370) --empty array-- -Warning: imagecolorallocate() expects parameter 3 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, array given in %s on line %d NULL --int indexed array-- -Warning: imagecolorallocate() expects parameter 3 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, array given in %s on line %d NULL --associative array-- -Warning: imagecolorallocate() expects parameter 3 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, array given in %s on line %d NULL --nested arrays-- -Warning: imagecolorallocate() expects parameter 3 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, array given in %s on line %d NULL --uppercase NULL-- @@ -163,42 +163,42 @@ int(655370) --empty string DQ-- -Warning: imagecolorallocate() expects parameter 3 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, string given in %s on line %d NULL --empty string SQ-- -Warning: imagecolorallocate() expects parameter 3 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, string given in %s on line %d NULL --string DQ-- -Warning: imagecolorallocate() expects parameter 3 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, string given in %s on line %d NULL --string SQ-- -Warning: imagecolorallocate() expects parameter 3 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, string given in %s on line %d NULL --mixed case string-- -Warning: imagecolorallocate() expects parameter 3 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, string given in %s on line %d NULL --heredoc-- -Warning: imagecolorallocate() expects parameter 3 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, string given in %s on line %d NULL --instance of classWithToString-- -Warning: imagecolorallocate() expects parameter 3 to be long, object given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, object given in %s on line %d NULL --instance of classWithoutToString-- -Warning: imagecolorallocate() expects parameter 3 to be long, object given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, object given in %s on line %d NULL --undefined var-- @@ -209,6 +209,6 @@ int(655370) --file resource-- -Warning: imagecolorallocate() expects parameter 3 to be long, resource given in %s on line %d +Warning: imagecolorallocate() expects parameter 3 to be integer, resource given in %s on line %d NULL ===DONE===
\ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocate_variation4.phpt b/ext/gd/tests/imagecolorallocate_variation4.phpt index 328a4cd3b2..e4ef7c62a2 100644 --- a/ext/gd/tests/imagecolorallocate_variation4.phpt +++ b/ext/gd/tests/imagecolorallocate_variation4.phpt @@ -8,6 +8,7 @@ if(!extension_loaded('gd')) { if(!function_exists('imagecreatetruecolor')) { die('skip imagecreatetruecolor function is not available'); } +if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?> --FILE-- <?php @@ -124,22 +125,22 @@ int(657920) --empty array-- -Warning: imagecolorallocate() expects parameter 4 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, array given in %s on line %d NULL --int indexed array-- -Warning: imagecolorallocate() expects parameter 4 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, array given in %s on line %d NULL --associative array-- -Warning: imagecolorallocate() expects parameter 4 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, array given in %s on line %d NULL --nested arrays-- -Warning: imagecolorallocate() expects parameter 4 to be long, array given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, array given in %s on line %d NULL --uppercase NULL-- @@ -162,42 +163,42 @@ int(657920) --empty string DQ-- -Warning: imagecolorallocate() expects parameter 4 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, string given in %s on line %d NULL --empty string SQ-- -Warning: imagecolorallocate() expects parameter 4 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, string given in %s on line %d NULL --string DQ-- -Warning: imagecolorallocate() expects parameter 4 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, string given in %s on line %d NULL --string SQ-- -Warning: imagecolorallocate() expects parameter 4 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, string given in %s on line %d NULL --mixed case string-- -Warning: imagecolorallocate() expects parameter 4 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, string given in %s on line %d NULL --heredoc-- -Warning: imagecolorallocate() expects parameter 4 to be long, string given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, string given in %s on line %d NULL --instance of classWithToString-- -Warning: imagecolorallocate() expects parameter 4 to be long, object given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, object given in %s on line %d NULL --instance of classWithoutToString-- -Warning: imagecolorallocate() expects parameter 4 to be long, object given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, object given in %s on line %d NULL --undefined var-- @@ -208,6 +209,6 @@ int(657920) --file resource-- -Warning: imagecolorallocate() expects parameter 4 to be long, resource given in %s on line %d +Warning: imagecolorallocate() expects parameter 4 to be integer, resource given in %s on line %d NULL -===DONE===
\ No newline at end of file +===DONE=== diff --git a/ext/gd/tests/imagecolorallocatealpha_error2.phpt b/ext/gd/tests/imagecolorallocatealpha_error2.phpt index ba9e5de699..d0df2a7d6b 100644 --- a/ext/gd/tests/imagecolorallocatealpha_error2.phpt +++ b/ext/gd/tests/imagecolorallocatealpha_error2.phpt @@ -15,8 +15,8 @@ imagecolorallocatealpha($img, array(), 255, 255, 50); imagecolorallocatealpha($img, tmpfile(), 255, 255, 50); ?> --EXPECTF-- -Warning: imagecolorallocatealpha() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 2 to be integer, %s given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 2 to be long, array given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 2 to be integer, array given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 2 to be long, resource given in %s on line %d
\ No newline at end of file +Warning: imagecolorallocatealpha() expects parameter 2 to be integer, resource given in %s on line %d
\ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error3.phpt b/ext/gd/tests/imagecolorallocatealpha_error3.phpt index ee8f646e78..ab92960c20 100644 --- a/ext/gd/tests/imagecolorallocatealpha_error3.phpt +++ b/ext/gd/tests/imagecolorallocatealpha_error3.phpt @@ -15,8 +15,8 @@ imagecolorallocatealpha($img, 255, array(), 255, 50); imagecolorallocatealpha($img, 255, tmpfile(), 255, 50); ?> --EXPECTF-- -Warning: imagecolorallocatealpha() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 3 to be integer, %s given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 3 to be long, array given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 3 to be integer, array given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 3 to be long, resource given in %s on line %d
\ No newline at end of file +Warning: imagecolorallocatealpha() expects parameter 3 to be integer, resource given in %s on line %d
\ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error4.phpt b/ext/gd/tests/imagecolorallocatealpha_error4.phpt index 2b5b471890..708e95e680 100644 --- a/ext/gd/tests/imagecolorallocatealpha_error4.phpt +++ b/ext/gd/tests/imagecolorallocatealpha_error4.phpt @@ -15,8 +15,8 @@ imagecolorallocatealpha($img, 255, 255, array(), 50); imagecolorallocatealpha($img, 255, 255, tmpfile(), 50); ?> --EXPECTF-- -Warning: imagecolorallocatealpha() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 4 to be integer, %s given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 4 to be long, array given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 4 to be integer, array given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 4 to be long, resource given in %s on line %d
\ No newline at end of file +Warning: imagecolorallocatealpha() expects parameter 4 to be integer, resource given in %s on line %d
\ No newline at end of file diff --git a/ext/gd/tests/imagecolorallocatealpha_error5.phpt b/ext/gd/tests/imagecolorallocatealpha_error5.phpt index 2d77833e9c..fd43410365 100644 --- a/ext/gd/tests/imagecolorallocatealpha_error5.phpt +++ b/ext/gd/tests/imagecolorallocatealpha_error5.phpt @@ -15,8 +15,8 @@ imagecolorallocatealpha($img, 255, 255, 255, array()); imagecolorallocatealpha($img, 255, 255, 255, tmpfile()); ?> --EXPECTF-- -Warning: imagecolorallocatealpha() expects parameter 5 to be long, %s given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 5 to be integer, %s given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 5 to be long, array given in %s on line %d +Warning: imagecolorallocatealpha() expects parameter 5 to be integer, array given in %s on line %d -Warning: imagecolorallocatealpha() expects parameter 5 to be long, resource given in %s on line %d
\ No newline at end of file +Warning: imagecolorallocatealpha() expects parameter 5 to be integer, resource given in %s on line %d
\ No newline at end of file diff --git a/ext/gd/tests/imagecolorclosesthwb.phpt b/ext/gd/tests/imagecolorclosesthwb.phpt index 4266514a85..79df5a11eb 100644 --- a/ext/gd/tests/imagecolorclosesthwb.phpt +++ b/ext/gd/tests/imagecolorclosesthwb.phpt @@ -26,5 +26,5 @@ NULL Warning: imagecolorclosesthwb() expects parameter 1 to be resource, null given in %s on line %d NULL -Warning: imagecolorclosesthwb() expects parameter 2 to be long, string given in %s on line %d +Warning: imagecolorclosesthwb() expects parameter 2 to be integer, string given in %s on line %d NULL diff --git a/ext/gd/tests/imagecreatetruecolor_error1.phpt b/ext/gd/tests/imagecreatetruecolor_error1.phpt index e161688ce0..7ec75aa66f 100644 --- a/ext/gd/tests/imagecreatetruecolor_error1.phpt +++ b/ext/gd/tests/imagecreatetruecolor_error1.phpt @@ -13,6 +13,6 @@ $image = imagecreatetruecolor('s', 30); $image = imagecreatetruecolor(30, 's'); ?> --EXPECTF-- -Warning: imagecreatetruecolor() expects parameter 1 to be long, %s given in %s on line %d +Warning: imagecreatetruecolor() expects parameter 1 to be integer, %s given in %s on line %d -Warning: imagecreatetruecolor() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagecreatetruecolor() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagecreatetruecolor_error2.phpt b/ext/gd/tests/imagecreatetruecolor_error2.phpt index c5a5e69283..62ff43a62f 100644 --- a/ext/gd/tests/imagecreatetruecolor_error2.phpt +++ b/ext/gd/tests/imagecreatetruecolor_error2.phpt @@ -19,6 +19,6 @@ Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d -Warning: imagecreatetruecolor() expects parameter 1 to be long, double given in %s on line %d +Warning: imagecreatetruecolor() expects parameter 1 to be integer, float given in %s on line %d -Warning: imagecreatetruecolor() expects parameter 2 to be long, double given in %s on line %d +Warning: imagecreatetruecolor() expects parameter 2 to be integer, float given in %s on line %d diff --git a/ext/gd/tests/imageellipse_error2.phpt b/ext/gd/tests/imageellipse_error2.phpt index 5b65bf8a5c..d9062f6531 100644 --- a/ext/gd/tests/imageellipse_error2.phpt +++ b/ext/gd/tests/imageellipse_error2.phpt @@ -18,4 +18,4 @@ imageellipse($image, 'wrong param', 150, 300, 200, 16777215); ?> --EXPECTF-- -Warning: imageellipse() expects parameter 2 to be long, %s given in %s on line %d +Warning: imageellipse() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imageellipse_error3.phpt b/ext/gd/tests/imageellipse_error3.phpt index cbac2f0e79..fca825ff2f 100644 --- a/ext/gd/tests/imageellipse_error3.phpt +++ b/ext/gd/tests/imageellipse_error3.phpt @@ -18,4 +18,4 @@ imageellipse($image, 200, 'wrong param', 300, 200, 16777215); ?> --EXPECTF-- -Warning: imageellipse() expects parameter 3 to be long, %s given in %s on line %d +Warning: imageellipse() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imageellipse_error4.phpt b/ext/gd/tests/imageellipse_error4.phpt index dec2e0fbdc..c8d6eb0fa0 100644 --- a/ext/gd/tests/imageellipse_error4.phpt +++ b/ext/gd/tests/imageellipse_error4.phpt @@ -18,4 +18,4 @@ imageellipse($image, 200, 150, 'wrong param', 200, 16777215); ?> --EXPECTF-- -Warning: imageellipse() expects parameter 4 to be long, %s given in %s on line %d +Warning: imageellipse() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imageellipse_error5.phpt b/ext/gd/tests/imageellipse_error5.phpt index 4272470c6d..e4d2473225 100644 --- a/ext/gd/tests/imageellipse_error5.phpt +++ b/ext/gd/tests/imageellipse_error5.phpt @@ -18,4 +18,4 @@ imageellipse($image, 200, 150, 300, 'wrong param', 16777215); ?> --EXPECTF-- -Warning: imageellipse() expects parameter 5 to be long, %s given in %s on line %d +Warning: imageellipse() expects parameter 5 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imageellipse_error6.phpt b/ext/gd/tests/imageellipse_error6.phpt index 8628525b6f..d3eebd140e 100644 --- a/ext/gd/tests/imageellipse_error6.phpt +++ b/ext/gd/tests/imageellipse_error6.phpt @@ -18,4 +18,4 @@ imageellipse($image, 200, 150, 300, 200, 'wrong param'); ?> --EXPECTF-- -Warning: imageellipse() expects parameter 6 to be long, %s given in %s on line %d +Warning: imageellipse() expects parameter 6 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagefilltoborder_error2.phpt b/ext/gd/tests/imagefilltoborder_error2.phpt index dcbf904708..8ad1f4004e 100644 --- a/ext/gd/tests/imagefilltoborder_error2.phpt +++ b/ext/gd/tests/imagefilltoborder_error2.phpt @@ -23,4 +23,4 @@ imagefilltoborder( $image, 'wrong param', 50, imagecolorallocate( $image, 0, 0, ?> --EXPECTF-- -Warning: imagefilltoborder() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagefilltoborder() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagefilltoborder_error3.phpt b/ext/gd/tests/imagefilltoborder_error3.phpt index 73f6cf7b89..b0e089cfa0 100644 --- a/ext/gd/tests/imagefilltoborder_error3.phpt +++ b/ext/gd/tests/imagefilltoborder_error3.phpt @@ -23,4 +23,4 @@ imagefilltoborder( $image, 50, 'wrong param', imagecolorallocate( $image, 0, 0, ?> --EXPECTF-- -Warning: imagefilltoborder() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagefilltoborder() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagefilltoborder_error4.phpt b/ext/gd/tests/imagefilltoborder_error4.phpt index a5073d80bd..94a6123a96 100644 --- a/ext/gd/tests/imagefilltoborder_error4.phpt +++ b/ext/gd/tests/imagefilltoborder_error4.phpt @@ -23,4 +23,4 @@ imagefilltoborder( $image, 50, 50, 'wrong param', imagecolorallocate( $image, 25 ?> --EXPECTF-- -Warning: imagefilltoborder() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagefilltoborder() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagefilltoborder_error5.phpt b/ext/gd/tests/imagefilltoborder_error5.phpt index eff344a787..6f4255ae3b 100644 --- a/ext/gd/tests/imagefilltoborder_error5.phpt +++ b/ext/gd/tests/imagefilltoborder_error5.phpt @@ -23,4 +23,4 @@ imagefilltoborder( $image, 50, 50, imagecolorallocate( $image, 0, 0, 0 ), 'wrong ?> --EXPECTF-- -Warning: imagefilltoborder() expects parameter 5 to be long, %s given in %s on line %d +Warning: imagefilltoborder() expects parameter 5 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagefilter_error14.phpt b/ext/gd/tests/imagefilter_error14.phpt index 64103954db..9db5c60506 100644 --- a/ext/gd/tests/imagefilter_error14.phpt +++ b/ext/gd/tests/imagefilter_error14.phpt @@ -14,5 +14,5 @@ $image = imagecreatetruecolor(180, 30); var_dump(imagefilter($image, IMG_FILTER_COLORIZE, 'wrong parameter', 255, 255)); ?> --EXPECTF-- -Warning: imagefilter() expects parameter 3 to be long, %unicode_string_optional% given in %s on line %d +Warning: imagefilter() expects parameter 3 to be integer, %unicode_string_optional% given in %s on line %d bool(false) diff --git a/ext/gd/tests/imagefilter_error16.phpt b/ext/gd/tests/imagefilter_error16.phpt index 2a84c2f789..4ce425a479 100644 --- a/ext/gd/tests/imagefilter_error16.phpt +++ b/ext/gd/tests/imagefilter_error16.phpt @@ -14,5 +14,5 @@ $image = imagecreatetruecolor(180, 30); var_dump(imagefilter($image, IMG_FILTER_CONTRAST, 'wrong parameter')); ?> --EXPECTF-- -Warning: imagefilter() expects parameter 3 to be long, %unicode_string_optional% given in %s on line %d +Warning: imagefilter() expects parameter 3 to be integer, %unicode_string_optional% given in %s on line %d bool(false) diff --git a/ext/gd/tests/imagefilter_error19.phpt b/ext/gd/tests/imagefilter_error19.phpt index e36b817aa2..c79be0a17a 100644 --- a/ext/gd/tests/imagefilter_error19.phpt +++ b/ext/gd/tests/imagefilter_error19.phpt @@ -14,5 +14,5 @@ $image = imagecreatetruecolor(180, 30); var_dump(imagefilter($image, IMG_FILTER_BRIGHTNESS, 'wrong parameter')); ?> --EXPECTF-- -Warning: imagefilter() expects parameter 3 to be long, %unicode_string_optional% given in %s on line %d +Warning: imagefilter() expects parameter 3 to be integer, %unicode_string_optional% given in %s on line %d bool(false) diff --git a/ext/gd/tests/imagefilter_error2.phpt b/ext/gd/tests/imagefilter_error2.phpt index 62ac6620c6..2523168af5 100644 --- a/ext/gd/tests/imagefilter_error2.phpt +++ b/ext/gd/tests/imagefilter_error2.phpt @@ -14,5 +14,5 @@ $image = imagecreatetruecolor(180, 30); var_dump(imagefilter($image, 'wrong parameter')); ?> --EXPECTF-- -Warning: imagefilter() expects parameter 2 to be long, %unicode_string_optional% given in %s on line %d +Warning: imagefilter() expects parameter 2 to be integer, %unicode_string_optional% given in %s on line %d NULL diff --git a/ext/gd/tests/imagefilter_error3.phpt b/ext/gd/tests/imagefilter_error3.phpt index 67f6c199f3..4440f7d000 100644 --- a/ext/gd/tests/imagefilter_error3.phpt +++ b/ext/gd/tests/imagefilter_error3.phpt @@ -14,5 +14,5 @@ $image = imagecreatetruecolor(180, 30); var_dump(imagefilter($image, IMG_FILTER_PIXELATE, 'wrong parameter')); ?> --EXPECTF-- -Warning: imagefilter() expects parameter 3 to be long, %unicode_string_optional% given in %s on line %d +Warning: imagefilter() expects parameter 3 to be integer, %unicode_string_optional% given in %s on line %d bool(false) diff --git a/ext/gd/tests/imagefilter_error5.phpt b/ext/gd/tests/imagefilter_error5.phpt index a7d9443427..443f12b32b 100644 --- a/ext/gd/tests/imagefilter_error5.phpt +++ b/ext/gd/tests/imagefilter_error5.phpt @@ -14,5 +14,5 @@ $image = imagecreatetruecolor(180, 30); var_dump(imagefilter($image, IMG_FILTER_SMOOTH, 'wrong parameter')); ?> --EXPECTF-- -Warning: imagefilter() expects parameter 3 to be double, %unicode_string_optional% given in %s on line %d +Warning: imagefilter() expects parameter 3 to be float, %unicode_string_optional% given in %s on line %d bool(false) diff --git a/ext/gd/tests/imagefontheight_error1.phpt b/ext/gd/tests/imagefontheight_error1.phpt index 88d1771648..34aa4a8903 100644 --- a/ext/gd/tests/imagefontheight_error1.phpt +++ b/ext/gd/tests/imagefontheight_error1.phpt @@ -12,4 +12,4 @@ Rafael Dohms <rdohms [at] gmail [dot] com> imagefontheight('string'); ?> --EXPECTF-- -Warning: imagefontheight() expects parameter 1 to be long, %s given in %s on line %d +Warning: imagefontheight() expects parameter 1 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagefontwidth_error1.phpt b/ext/gd/tests/imagefontwidth_error1.phpt index dd80034fcc..c1a1463b9b 100644 --- a/ext/gd/tests/imagefontwidth_error1.phpt +++ b/ext/gd/tests/imagefontwidth_error1.phpt @@ -12,4 +12,4 @@ Rafael Dohms <rdohms [at] gmail [dot] com> imagefontwidth('string'); ?> --EXPECTF-- -Warning: imagefontwidth() expects parameter 1 to be long, %s given in %s on line %d +Warning: imagefontwidth() expects parameter 1 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagegammacorrect_error3.phpt b/ext/gd/tests/imagegammacorrect_error3.phpt index fd680aa130..6dcecbe04b 100644 --- a/ext/gd/tests/imagegammacorrect_error3.phpt +++ b/ext/gd/tests/imagegammacorrect_error3.phpt @@ -14,4 +14,4 @@ $gamma = imagegammacorrect($image, 'string', 5); ?> --EXPECTF-- -Warning: imagegammacorrect() expects parameter 2 to be double, %s given in %s on line %d +Warning: imagegammacorrect() expects parameter 2 to be float, %s given in %s on line %d diff --git a/ext/gd/tests/imagegammacorrect_error4.phpt b/ext/gd/tests/imagegammacorrect_error4.phpt index 5476d4c85b..e7ff6b4528 100644 --- a/ext/gd/tests/imagegammacorrect_error4.phpt +++ b/ext/gd/tests/imagegammacorrect_error4.phpt @@ -14,4 +14,4 @@ $gamma = imagegammacorrect($image, 1, 'string'); ?> --EXPECTF-- -Warning: imagegammacorrect() expects parameter 3 to be double, %s given in %s on line %d +Warning: imagegammacorrect() expects parameter 3 to be float, %s given in %s on line %d diff --git a/ext/gd/tests/imagelayereffect_error2.phpt b/ext/gd/tests/imagelayereffect_error2.phpt index d8d331bfdc..bd1d5aaf1f 100644 --- a/ext/gd/tests/imagelayereffect_error2.phpt +++ b/ext/gd/tests/imagelayereffect_error2.phpt @@ -15,4 +15,4 @@ $image = imagecreatetruecolor(180, 30); $layer = imagelayereffect($image, 'IMG_EFFECT_REPLACE'); ?> --EXPECTF-- -Warning: imagelayereffect() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagelayereffect() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagerectangle_error3.phpt b/ext/gd/tests/imagerectangle_error3.phpt index d5dd4c1d80..eceab1e99b 100644 --- a/ext/gd/tests/imagerectangle_error3.phpt +++ b/ext/gd/tests/imagerectangle_error3.phpt @@ -16,4 +16,4 @@ $image = imagecreatetruecolor( 100, 100 ); imagerectangle( $image, 'wrong param', 0, 50, 50, imagecolorallocate($image, 255, 255, 255) );
?>
--EXPECTF--
-Warning: imagerectangle() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagerectangle() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagerectangle_error4.phpt b/ext/gd/tests/imagerectangle_error4.phpt index 7ecc4167a8..5d8e1cecac 100644 --- a/ext/gd/tests/imagerectangle_error4.phpt +++ b/ext/gd/tests/imagerectangle_error4.phpt @@ -16,4 +16,4 @@ $image = imagecreatetruecolor( 100, 100 ); imagerectangle( $image, 0, 'wrong param', 50, 50, imagecolorallocate($image, 255, 255, 255) );
?>
--EXPECTF--
-Warning: imagerectangle() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagerectangle() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagerectangle_error5.phpt b/ext/gd/tests/imagerectangle_error5.phpt index b4288d270c..df9c457d6f 100644 --- a/ext/gd/tests/imagerectangle_error5.phpt +++ b/ext/gd/tests/imagerectangle_error5.phpt @@ -16,4 +16,4 @@ $image = imagecreatetruecolor( 100, 100 ); imagerectangle( $image, 0, 0, 'wrong param', 50, imagecolorallocate($image, 255, 255, 255) );
?>
--EXPECTF--
-Warning: imagerectangle() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagerectangle() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagerectangle_error6.phpt b/ext/gd/tests/imagerectangle_error6.phpt index aab378e557..a91c6bbc0c 100644 --- a/ext/gd/tests/imagerectangle_error6.phpt +++ b/ext/gd/tests/imagerectangle_error6.phpt @@ -16,4 +16,4 @@ $image = imagecreatetruecolor( 100, 100 ); imagerectangle( $image, 0, 0, 50, 'wrong param', imagecolorallocate($image, 255, 255, 255) );
?>
--EXPECTF--
-Warning: imagerectangle() expects parameter 5 to be long, %s given in %s on line %d +Warning: imagerectangle() expects parameter 5 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagerectangle_error7.phpt b/ext/gd/tests/imagerectangle_error7.phpt index f6ed778db7..f819da6e6c 100644 --- a/ext/gd/tests/imagerectangle_error7.phpt +++ b/ext/gd/tests/imagerectangle_error7.phpt @@ -16,4 +16,4 @@ $image = imagecreatetruecolor( 100, 100 ); imagerectangle( $image, 0, 0, 50, 50, 'wrong param' );
?>
--EXPECTF--
-Warning: imagerectangle() expects parameter 6 to be long, %s given in %s on line %d +Warning: imagerectangle() expects parameter 6 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagesetthickness_error2.phpt b/ext/gd/tests/imagesetthickness_error2.phpt index 4c8924e467..263e18bcc3 100644 --- a/ext/gd/tests/imagesetthickness_error2.phpt +++ b/ext/gd/tests/imagesetthickness_error2.phpt @@ -17,8 +17,8 @@ imagesetthickness($image, $image); ?> --EXPECTF-- -Warning: imagesetthickness() expects parameter 2 to be long, string given in %s on line %d +Warning: imagesetthickness() expects parameter 2 to be integer, string given in %s on line %d -Warning: imagesetthickness() expects parameter 2 to be long, array given in %s on line %d +Warning: imagesetthickness() expects parameter 2 to be integer, array given in %s on line %d -Warning: imagesetthickness() expects parameter 2 to be long, resource given in %s on line %d
\ No newline at end of file +Warning: imagesetthickness() expects parameter 2 to be integer, resource given in %s on line %d
\ No newline at end of file diff --git a/ext/gd/tests/imagestring_error3.phpt b/ext/gd/tests/imagestring_error3.phpt index d9a9e47d24..464e46e8d2 100644 --- a/ext/gd/tests/imagestring_error3.phpt +++ b/ext/gd/tests/imagestring_error3.phpt @@ -14,4 +14,4 @@ $result = imagestring($image, 'string', 5, 5, 'String', 1); ?> --EXPECTF-- -Warning: imagestring() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagestring() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestring_error4.phpt b/ext/gd/tests/imagestring_error4.phpt index 40330b17be..f782b7bda4 100644 --- a/ext/gd/tests/imagestring_error4.phpt +++ b/ext/gd/tests/imagestring_error4.phpt @@ -14,4 +14,4 @@ $result = imagestring($image, 1, 'string', 5, 'String', 1); ?> --EXPECTF-- -Warning: imagestring() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagestring() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestring_error5.phpt b/ext/gd/tests/imagestring_error5.phpt index 6f45c55a6f..d774314797 100644 --- a/ext/gd/tests/imagestring_error5.phpt +++ b/ext/gd/tests/imagestring_error5.phpt @@ -14,4 +14,4 @@ $result = imagestring($image, 1, 5, 'string', 'String', 1); ?> --EXPECTF-- -Warning: imagestring() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagestring() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestring_error7.phpt b/ext/gd/tests/imagestring_error7.phpt index 75ab2f6af5..2f44682a93 100644 --- a/ext/gd/tests/imagestring_error7.phpt +++ b/ext/gd/tests/imagestring_error7.phpt @@ -14,4 +14,4 @@ $result = imagestring($image, 1, 5, 5, 'String', 'font'); ?> --EXPECTF-- -Warning: imagestring() expects parameter 6 to be long, %s given in %s on line %d +Warning: imagestring() expects parameter 6 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestringup_error3.phpt b/ext/gd/tests/imagestringup_error3.phpt index 27e9007d3f..e4cfe98c75 100644 --- a/ext/gd/tests/imagestringup_error3.phpt +++ b/ext/gd/tests/imagestringup_error3.phpt @@ -14,4 +14,4 @@ $result = imagestringup($image, 'string', 5, 5, 'String', 1); ?> --EXPECTF-- -Warning: imagestringup() expects parameter 2 to be long, %s given in %s on line %d +Warning: imagestringup() expects parameter 2 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestringup_error4.phpt b/ext/gd/tests/imagestringup_error4.phpt index af2b8c05f2..0b525cea26 100644 --- a/ext/gd/tests/imagestringup_error4.phpt +++ b/ext/gd/tests/imagestringup_error4.phpt @@ -14,4 +14,4 @@ $result = imagestringup($image, 1, 'string', 5, 'String', 1); ?> --EXPECTF-- -Warning: imagestringup() expects parameter 3 to be long, %s given in %s on line %d +Warning: imagestringup() expects parameter 3 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestringup_error5.phpt b/ext/gd/tests/imagestringup_error5.phpt index 6f45c55a6f..d774314797 100644 --- a/ext/gd/tests/imagestringup_error5.phpt +++ b/ext/gd/tests/imagestringup_error5.phpt @@ -14,4 +14,4 @@ $result = imagestring($image, 1, 5, 'string', 'String', 1); ?> --EXPECTF-- -Warning: imagestring() expects parameter 4 to be long, %s given in %s on line %d +Warning: imagestring() expects parameter 4 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagestringup_error7.phpt b/ext/gd/tests/imagestringup_error7.phpt index 396f2ddd61..4609936567 100644 --- a/ext/gd/tests/imagestringup_error7.phpt +++ b/ext/gd/tests/imagestringup_error7.phpt @@ -14,4 +14,4 @@ $result = imagestringup($image, 1, 5, 5, 'String', 'font'); ?> --EXPECTF-- -Warning: imagestringup() expects parameter 6 to be long, %s given in %s on line %d +Warning: imagestringup() expects parameter 6 to be integer, %s given in %s on line %d diff --git a/ext/gd/tests/imagetruecolortopalette_error3.phpt b/ext/gd/tests/imagetruecolortopalette_error3.phpt index d65a995014..de3a62d0a5 100644 --- a/ext/gd/tests/imagetruecolortopalette_error3.phpt +++ b/ext/gd/tests/imagetruecolortopalette_error3.phpt @@ -19,10 +19,10 @@ imagetruecolortopalette($image, true, null); ?> --EXPECTF-- -Warning: imagetruecolortopalette() expects parameter 3 to be long, string given in %s on line %d +Warning: imagetruecolortopalette() expects parameter 3 to be integer, string given in %s on line %d -Warning: imagetruecolortopalette() expects parameter 3 to be long, resource given in %s on line %d +Warning: imagetruecolortopalette() expects parameter 3 to be integer, resource given in %s on line %d -Warning: imagetruecolortopalette() expects parameter 3 to be long, array given in %s on line %d +Warning: imagetruecolortopalette() expects parameter 3 to be integer, array given in %s on line %d Warning: imagetruecolortopalette(): Number of colors has to be greater than zero in %s on line %d
\ No newline at end of file |
