diff options
author | Jouni Ahto <jah@php.net> | 2000-06-16 10:09:12 +0000 |
---|---|---|
committer | Jouni Ahto <jah@php.net> | 2000-06-16 10:09:12 +0000 |
commit | f5888acfbaae02e7a6b384ba38d36c3e612eb7ba (patch) | |
tree | 1b8af6db7ce0efb48fc8075955e05ff13ad5a70d /ext | |
parent | bd900fb66b124f607685b5727917a45163b59706 (diff) | |
download | php-git-f5888acfbaae02e7a6b384ba38d36c3e612eb7ba.tar.gz |
- Forgot to test check for errors in two places.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/gd/gd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index be578ffd0e..6c8965218d 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1915,7 +1915,10 @@ PHP_FUNCTION(imagepsloadfont) } } - T1_LoadFont(f_ind); + if (T1_LoadFont(f_ind)) { + php_error(E_WARNING, "Couldn't load the font"); + RETURN_FALSE; + } font = (int *) emalloc(sizeof(int)); *font = f_ind; @@ -2221,7 +2224,10 @@ PHP_FUNCTION(imagepstext) space, T1_KERNING, (*sz)->value.lval, transform); } - if (T1_errno) RETURN_FALSE; + if (T1_errno) { + php_error(E_WARNING, "libt1 returned error %d", T1_errno); + RETURN_FALSE; + } h_lines = str_img->metrics.ascent - str_img->metrics.descent; v_lines = str_img->metrics.rightSideBearing - str_img->metrics.leftSideBearing; @@ -2239,6 +2245,7 @@ PHP_FUNCTION(imagepstext) } if (array_init(return_value) == FAILURE) { + php_error(E_WARNING, "Couldn't initialize array for returning bounding box"); RETURN_FALSE; } |