Changeset 1740


Ignore:
Timestamp:
12/02/09 15:39:26 (14 years ago)
Author:
rodsouza
Message:

Ticket #491 - Mitigando situações que criam inundam o LOG.

Location:
trunk/expressoMail1_2/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r1739 r1740  
    163163                $from = $header->from; 
    164164                $head_array['from'] = array(); 
    165                 $head_array['from']['name'] = $this->decode_string($from[0]->personal); 
     165                $head_array['from']['name'] = ( isset( $from[0]->personal ) ) ? $this->decode_string($from[0]->personal) : NULL; 
    166166                $head_array['from']['email'] = $this->decode_string($from[0]->mailbox) . "@" . $from[0]->host; 
    167167                if(!$head_array['from']['name']) 
     
    169169                $to = $header->to; 
    170170                $head_array['to'] = array(); 
    171                 $tmp = imap_mime_header_decode($to[0]->personal); 
    172                 $head_array['to']['name'] = $this->decode_string($this->decode_string($tmp[0]->text)); 
    173                 $head_array['to']['email'] = $this->decode_string($to[0]->mailbox) . "@" . $to[0]->host; 
     171                $tmp = ( isset( $to[0]->personal ) ) ? imap_mime_header_decode($to[0]->personal) : NULL; 
     172                $head_array['to']['name'] = ( isset( $tmp[0]->text ) ) ? $this->decode_string($this->decode_string($tmp[0]->text)) : NULL; 
     173                $head_array['to']['email'] = ( isset( $to[0]->mailbox ) ) ? ( $this->decode_string($to[0]->mailbox) . "@" . ( ( isset( $to[0]->host ) ) ? $to[0]->host : '' ) ) : NULL; 
    174174                if(!$head_array['to']['name']) 
    175175                        $head_array['to']['name'] = $head_array['to']['email']; 
    176                 $head_array['subject'] = $this->decode_string($header->fetchsubject); 
     176                $head_array['subject'] = ( isset( $header->fetchsubject ) ) ? $this->decode_string($header->fetchsubject) : NULL; 
    177177 
    178178                $head_array['Size'] = $header->Size; 
     
    189189                if ((strpos(strtolower($string), '=?iso-8859-1') !== false) || (strpos(strtolower($string), '=?windows-1252') !== false)) 
    190190                { 
     191                        $return = ''; 
    191192                        $tmp = imap_mime_header_decode($string); 
    192193                        foreach ($tmp as $tmp1) 
  • trunk/expressoMail1_2/inc/class.ldap_functions.inc.php

    r1639 r1740  
    2020        // todo: Page Configuration for External Catalogs. 
    2121                @include("../contactcenter/setup/external_catalogs.inc.php"); 
    22                 $this->external_srcs= $external_srcs; 
     22                $this->external_srcs= ( isset( $external_srcs ) ) ? $external_srcs : NULL; 
    2323                $this->max_result       = 200; 
    2424                $this->functions = new functions(); 
Note: See TracChangeset for help on using the changeset viewer.