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) ||
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();
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;
}