]> granicus.if.org Git - php/commitdiff
Fixed bug: #11784 (combined with fixes Rasmus committed..)
authorfoobar <sniper@php.net>
Sat, 4 Aug 2001 01:56:40 +0000 (01:56 +0000)
committerfoobar <sniper@php.net>
Sat, 4 Aug 2001 01:56:40 +0000 (01:56 +0000)
ext/exif/exif.c

index ad5e6d8df1665239c264e33fa74f5cc54e77a957..4469e43d7065ba22e7740a0542d00a4630bdb552 100644 (file)
@@ -1123,10 +1123,6 @@ PHP_FUNCTION(read_exif_data)
        ImageInfoType ImageInfo;
        char tmp[64];
 
-       /*ImageInfo.Thumbnail = NULL;
-       ImageInfo.ThumbnailSize = 0;
-       */
-
     if ((ac < 1 || ac > 2) || zend_get_parameters_ex(ac, &p_name, &p_readall) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
@@ -1217,7 +1213,7 @@ PHP_FUNCTION(read_exif_data)
        if(ImageInfo.Comments[0]) {
                add_assoc_string(return_value,"Comments",ImageInfo.Comments,1);
        }
-       if(ImageInfo.ThumbnailSize) {
+       if(ImageInfo.ThumbnailSize && ImageInfo.Thumbnail) {
                add_assoc_stringl(return_value,"Thumbnail",ImageInfo.Thumbnail,ImageInfo.ThumbnailSize,1);
                add_assoc_long(return_value,"ThumbnailSize",ImageInfo.ThumbnailSize);
                efree(ImageInfo.Thumbnail);