iliaa Tue Jul 1 22:03:59 2003 EDT Modified files: /php-src/ext/ming ming.c Log: Fixed a crash when text is added before a font is specified. Index: php-src/ext/ming/ming.c diff -u php-src/ext/ming/ming.c:1.47 php-src/ext/ming/ming.c:1.48 --- php-src/ext/ming/ming.c:1.47 Mon Jun 16 11:24:58 2003 +++ php-src/ext/ming/ming.c Tue Jul 1 22:03:59 2003 @@ -15,7 +15,7 @@ | Author: [EMAIL PROTECTED] | +----------------------------------------------------------------------+ - $Id: ming.c,v 1.47 2003/06/16 15:24:58 andrey Exp $ + $Id: ming.c,v 1.48 2003/07/02 02:03:59 iliaa Exp $ */ @@ -2386,6 +2386,11 @@ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &s) == FAILURE) { WRONG_PARAM_COUNT; } + if (!getFont(getText(getThis() TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must specify a font before writing text."); + RETURN_FALSE; + } + convert_to_string_ex(s); SWFText_addString(text, Z_STRVAL_PP(s), NULL); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php