Re: cvs: php4 /ext/gd gd.c

From: Date: Tue, 27 Aug 2002 19:51:17 +0000
Subject: Re: cvs: php4 /ext/gd gd.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13711@lists.php.net to get a copy of this message
Look harder - it will never open XPM images. At 21:51 27.08.2002, derick@php.net wrote:
On Tue, 27 Aug 2002, Marcus Börger wrote: Once more: What the .... is this supposed to do? Open an XPM image? Anyway... this should also be not available when there is no XPM support. Derick /* {{{ proto int imagecreatefromxpm(string filename)
    Create a new image from XPM file or URL */
PHP_FUNCTION(imagecreatefromxpm) {
         /*
#ifdef HAVE_GD_XPM
         _php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU,
PHP_GDIMG_TYPE_XPM, "XPM", gdImageCreateFromXpm, NULL); #else
         */
         php_error_docref(NULL TSRMLS_CC, E_WARNING, "No XPM support in
this PHP build");
         RETURN_FALSE;
         /*
#endif
         */
} /* }}} */ At 21:40 27.08.2002, Marcus Börger wrote:
helly           Tue Aug 27 15:40:56 2002 EDT
Modified files:
    /php4/ext/gd        gd.c
Log: php_error_docref BUT didn't we decide to disable those functions when not supported instead of displaying an error? Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.208 php4/ext/gd/gd.c:1.209
--- php4/ext/gd/gd.c:1.208      Fri Aug 23 13:53:03 2002
+++ php4/ext/gd/gd.c    Tue Aug 27 15:40:55 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/ -/* $Id: gd.c,v 1.208 2002/08/23 17:53:03 rasmus Exp $ */ +/* $Id: gd.c,v 1.209 2002/08/27 19:40:55 helly Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
    Cold Spring Harbor Labs. */
@@ -2700,7 +2700,7 @@ #if !HAVE_GD_STRINGFTEX
        if (extended)   {
-               zend_error(E_WARNING, "%s(): gdImageStringFTEx not
supported in this PHP build", get_active_function_name(TSRMLS_C));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING,
"gdImageStringFTEx not supported in this PHP build");
                RETURN_FALSE;
        }
#endif @@ -3440,7 +3440,7 @@
                case PHP_GDIMG_TYPE_GIF:
                        im_org = gdImageCreateFromGif (org);
                        if (im_org == NULL) {
-                               php_error_docref(NULL TSRMLS_CC,
E_WARNING, "%s(): Unable to open '%s' Not a valid GIF file", fn_dest);
+                               php_error_docref(NULL TSRMLS_CC,
E_WARNING, "Unable to open '%s' Not a valid GIF file", fn_dest);
                                RETURN_FALSE;
                        }
                        break;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --------------------------------------------------------------------------- Did I help you? http://www.derickrethans.nl/link.php?url=giftlist Frequent ranting: http://www.derickrethans.nl/ ---------------------------------------------------------------------------
                 PHP: Scripting the Web - derick@php.net
                    All your branches are belong to me!
                SRM: Script Running Machine - www.vl-srm.net
---------------------------------------------------------------------------


« previous php.cvs (#13711) next »