From: Pierre Joye Date: Mon, 30 Jul 2007 21:42:36 +0000 (+0000) Subject: - fix gd bug #102, < 0 means that no load are loaded, return false X-Git-Tag: php-5.2.4RC1~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ed7c8f3aa11fde67e8628afdf18bf7133822db5;p=php - fix gd bug #102, < 0 means that no load are loaded, return false - add error code in the warning --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 834e2b7501..f880b69905 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4363,7 +4363,8 @@ PHP_FUNCTION(imagepsloadfont) f_ind = T1_AddFont(Z_STRVAL_PP(file)); if (f_ind < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "T1Lib Error: %s", T1_StrError(f_ind)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "T1Lib Error (%i): %s", f_ind, T1_StrError(f_ind)); + RETURN_FALSE; } if (T1_LoadFont(f_ind)) {