pajoye Wed Aug 29 06:26:30 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/gd gd.c
Log:
- gd bug #102, alternative fix when an old library is used
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.30&r2=1.312.2.20.2.31&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.30 php-src/ext/gd/gd.c:1.312.2.20.2.31
--- php-src/ext/gd/gd.c:1.312.2.20.2.30 Mon Jul 30 21:42:36 2007
+++ php-src/ext/gd/gd.c Wed Aug 29 06:26:30 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.312.2.20.2.30 2007/07/30 21:42:36 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.31 2007/08/29 06:26:30 pajoye Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4353,6 +4353,9 @@
{
zval **file;
int f_ind, *font;
+#ifdef PHP_WIN32
+ struct stat st;
+#endif
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &file) ==
FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -4360,6 +4363,13 @@
convert_to_string_ex(file);
+#ifdef PHP_WIN32
+ if (VCWD_STAT(Z_STRVAL_PP(file), &st) < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Font file not
found (%s)", Z_STRVAL_PP(file));
+ RETURN_FALSE;
+ }
+#endif
+
f_ind = T1_AddFont(Z_STRVAL_PP(file));
if (f_ind < 0) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php