Changeset 2627


Ignore:
Timestamp:
04/23/10 17:08:18 (14 years ago)
Author:
niltonneto
Message:

Ticket #1051 - Corrigido tratamento do retorno da função imagecreatefromstring().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/expressoMail1_2/inc/show_thumbs.php

    r2055 r2627  
    2525        $image_mail = imap_fetchbody($mb, $msg_num, $msg_part, FT_UID); 
    2626        $image = imap_base64($image_mail); 
    27         $image = imagecreatefromstring ($image); 
     27        $pic = @imagecreatefromstring ($image); 
    2828         
    29         header("Content-Type: ".$file_type); 
    30         header("Content-Disposition: inline"); 
    31   
    32         $pic = $image; 
    33     if ($pic) { 
     29        if($pic !== FALSE) { 
     30                header("Content-Type: ".$file_type); 
     31                header("Content-Disposition: inline");           
    3432        $width = imagesx($pic); 
    3533        $height = imagesy($pic); 
     
    3836        $thumb = imagecreatetruecolor ($twidth, $theight); 
    3937                imagecopyresized($thumb, $pic, 0, 0, 0, 0,$twidth, $theight, $width, $height); # resize image into thumb 
    40                 imagejpeg($thumb,"",75); # Thumbnail as JPEG 
    41     } 
     38                imagejpeg($thumb,"",75); # Thumbnail as JPEG             
     39        } 
    4240?> 
Note: See TracChangeset for help on using the changeset viewer.