Changeset cc75440 in github


Ignore:
Timestamp:
Jan 3, 2012 4:55:38 AM (17 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
fdff340
Parents:
4deb1ef
Message:
  • Prevent from PHP warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap_generic.php

    ra9ed78a rcc75440  
    32503250            return false; 
    32513251        } 
     3252 
     3253        if (empty($part)) { 
     3254                    return $a; 
     3255            } 
     3256 
     3257        $ctype = is_string($a[0]) && is_string($a[1]) ? $a[0] . '/' . $a[1] : ''; 
     3258 
     3259        if (strcasecmp($ctype, 'message/rfc822') == 0) { 
     3260            $a = $a[8]; 
     3261        } 
     3262 
    32523263            if (strpos($part, '.') > 0) { 
    3253                     $original_part = $part; 
    3254                     $pos = strpos($part, '.'); 
    3255                     $rest = substr($original_part, $pos+1); 
    3256                     $part = substr($original_part, 0, $pos); 
    3257                     if ((strcasecmp($a[0], 'message') == 0) && (strcasecmp($a[1], 'rfc822') == 0)) { 
    3258                             $a = $a[8]; 
    3259                     } 
     3264                    $orig_part = $part; 
     3265                    $pos       = strpos($part, '.'); 
     3266                    $rest      = substr($orig_part, $pos+1); 
     3267                    $part      = substr($orig_part, 0, $pos); 
     3268 
    32603269                    return self::getStructurePartArray($a[$part-1], $rest); 
    32613270            } 
    3262         else if ($part>0) { 
    3263                     if (!is_array($a[0]) && (strcasecmp($a[0], 'message') == 0) 
    3264                 && (strcasecmp($a[1], 'rfc822') == 0)) { 
    3265                             $a = $a[8]; 
    3266                     } 
     3271        else if ($part > 0) { 
    32673272                    if (is_array($a[$part-1])) 
    32683273                return $a[$part-1]; 
    32693274                    else 
    32703275                return $a; 
    3271             } 
    3272         else if (($part == 0) || (empty($part))) { 
    3273                     return $a; 
    32743276            } 
    32753277    } 
Note: See TracChangeset for help on using the changeset viewer.