Skip to content

Commit

Permalink
- fix gd bug #102, < 0 means that no load are loaded, return false
Browse files Browse the repository at this point in the history
- add error code in the warning
  • Loading branch information
pierrejoye committed Jul 30, 2007
1 parent b96718b commit 6ed7c8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/gd/gd.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6ed7c8f

Please sign in to comment.