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

From: Date: Mon, 18 Mar 2002 00:27:42 +0000
Subject: Re: cvs: php4 /ext/exif exif.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10310@lists.php.net to get a copy of this message
Hi Marcus, we can lose the "#ifdef HAVE_PHP_STREAM", because there is no longer a choice not to have it :-) > + php_stream_make_seekable( ImageInfo->infile, &mem_stream); > + if ( !ImageInfo->FileSize) { > + php_stream_seek(mem_stream,0,SEEK_END); > + ImageInfo->FileSize = php_stream_tell(mem_stream); > + php_stream_seek(mem_stream,0,SEEK_SET); > } > - #else > - ImageInfo->FileSize = 0; > - #endif > + ImageInfo->infile = mem_stream; > } > + #endif It's also *extremely important* to check the return code from php_stream_make_seekable, because you might find that you are left with no valid streams! Also, mem_stream may be set to NULL on error. --Wez.

« previous php.cvs (#10310) next »