diff options
Diffstat (limited to 'ext/gd/gd.c')
-rw-r--r-- | ext/gd/gd.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index a8ed6309df..c0319b2c93 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -63,6 +63,9 @@ static int le_gd, le_gd_font; #include <gd.h> +#ifndef HAVE_GD_BUNDLED +# include <gd_errors.h> +#endif #include <gdfontt.h> /* 1 Tiny font */ #include <gdfonts.h> /* 2 Small font */ #include <gdfontmb.h> /* 3 Medium bold font */ @@ -1021,7 +1024,19 @@ static void php_free_gd_font(zend_resource *rsrc) void php_gd_error_method(int type, const char *format, va_list args) { - php_verror(NULL, "", type, format, args); + switch (type) { + case GD_DEBUG: + case GD_INFO: + case GD_NOTICE: + type = E_NOTICE; + break; + case GD_WARNING: + type = E_WARNING; + break; + default: + type = E_ERROR; + } + php_verror(NULL, "", type, format, args TSRMLS_CC); } /* }}} */ #endif |