]> granicus.if.org Git - php/commitdiff
implement my own FR #36995
authorAntony Dovgal <tony2001@php.net>
Tue, 1 Aug 2006 22:41:33 +0000 (22:41 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 1 Aug 2006 22:41:33 +0000 (22:41 +0000)
nuke unused variable

ext/gd/gd.c
ext/gd/gd_ctx.c

index a4449354bef3b91d4516866a5303171e66303c2e..c3920f506ccb36c45532fef61cb4666cffb59d4f 100644 (file)
@@ -2167,7 +2167,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) ||
@@ -4375,7 +4377,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();
index c1c61843774a1d769bcb0a7c17d17c6d82377569..4b5c0b48ded4ef42c00e6d9af0a1df11d7c43e49 100644 (file)
@@ -92,7 +92,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;
                }