Re: cvs: /php3/functions gd.c

From: Date: Fri, 21 Apr 2000 16:25:35 +0000
Subject: Re: cvs: /php3/functions gd.c
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-18108@lists.php.net to get a copy of this message
On Fri, 21 Apr 2000 02:25:53 -0000, Rasmus Lerdorf wrote: >rasmus Thu Apr 20 19:25:53 2000 EDT > > Modified files: > /php3/functions gd.c > Log: > createfrom* fixes Shouldn't these be php3_error()? I get "Undefined symbol _php_error referenced from text segment" with this. >Index: php3/functions/gd.c >diff -u php3/functions/gd.c:1.148 php3/functions/gd.c:1.149 >--- php3/functions/gd.c:1.148 Mon Mar 13 12:10:40 2000 >+++ php3/functions/gd.c Thu Apr 20 19:25:53 2000 >@@ -29,7 +29,7 @@ > +----------------------------------------------------------------------+ > */ > >-/* $Id: gd.c,v 1.148 2000/03/13 20:10:40 eschmid Exp $ */ >+/* $Id: gd.c,v 1.149 2000/04/21 02:25:53 rasmus Exp $ */ > > /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, > Cold Spring Harbor Labs. */ >@@ -417,6 +417,10 @@ > fflush(fp); > fclose(fp); > >+ if (!im) { >+ php_error(E_WARNING,"ImageCreateFromGif: %s is not a valid GIF file", fn); >+ RETURN_FALSE; >+ } > ind = php3_list_insert(im, GD_GLOBAL(le_gd)); > > RETURN_LONG(ind); >@@ -460,7 +464,10 @@ > > fflush(fp); > fclose(fp); >- >+ if (!im) { >+ php_error(E_WARNING,"ImageCreateFromPng: %s is not a valid PNG file", >fn); >+ RETURN_FALSE; >+ } > ind = php3_list_insert(im, GD_GLOBAL(le_gd)); > > RETURN_LONG(ind); >@@ -504,6 +511,11 @@ > > fflush(fp); > fclose(fp); >+ >+ if (!im) { >+ php_error(E_WARNING,"ImageCreateFromJPEG: %s is not a valid JPEG file", fn); >+ RETURN_FALSE; >+ } > > ind = php3_list_insert(im, GD_GLOBAL(le_gd)); > > > > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net >For additional commands, e-mail: php-dev-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- ______________________________________________________________________________ | Brian Havard | "He is not the messiah! | | brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian | ------------------------------------------------------------------------------

« previous php.dev (#18108) next »