diff options
author | Antony Dovgal <tony2001@php.net> | 2006-08-01 22:42:11 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-08-01 22:42:11 +0000 |
commit | e17320651c654a8e72cafcf966f5d408208356b7 (patch) | |
tree | 7f256fdaf2b146aba66bf8dd7a938f97d4aed8c3 | |
parent | a5ddba6f80e09767c396b99a2c857547ed97b438 (diff) | |
download | php-git-e17320651c654a8e72cafcf966f5d408208356b7.tar.gz |
MFH: implement my own FR #36995
add missing ifdefs
-rw-r--r-- | ext/gd/gd.c | 5 | ||||
-rw-r--r-- | ext/gd/gd_ctx.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 149a19d947..2994eb2c8b 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2357,8 +2357,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, php_stream *stream; FILE * fp = NULL; int argc=ZEND_NUM_ARGS(); +#ifdef HAVE_GD_JPG long ignore_warning; - +#endif if ((image_type == PHP_GDIMG_TYPE_GD2PART && argc != 5) || (image_type != PHP_GDIMG_TYPE_GD2PART && argc != 1) || @@ -4672,7 +4673,9 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) int int_threshold; int x, y; float x_ratio, y_ratio; +#ifdef HAVE_GD_JPG long ignore_warning; +#endif if (argc != 5 || zend_get_parameters_ex(argc, &f_org, &f_dest, &height, &width, &threshold) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index f92d519c1f..480b8e3e57 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -93,7 +93,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, 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 TSRMLS_CC, E_WARNING, "Unable to open '%s' for writing: %s", fn, strerror(errno)); RETURN_FALSE; } |