Ignore:
Timestamp:
12/18/12 16:15:29 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Performance: Function Within Loop Declaration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/library/mime/mimePart.php

    r7655 r7673  
    283283            $encoded['body'] = '';  
    284284 
    285             for ($i = 0; $i < count($this->_subparts); ++$i) { 
     285            $subparts_count = count($this->_subparts); 
     286            for ($i = 0; $i < $subparts_count; ++$i) { 
    286287                $encoded['body'] .= '--' . $boundary . $eol; 
    287288                $tmp = $this->_subparts[$i]->encode(); 
     
    393394 
    394395        if (count($this->_subparts)) { 
    395             for ($i = 0; $i < count($this->_subparts); ++$i) { 
     396            $subparts_count = count($this->_subparts); 
     397            for ($i = 0; $i < $subparts_count; ++$i) { 
    396398                fwrite($fh, $f_eol . '--' . $boundary . $eol); 
    397399                $res = $this->_subparts[$i]->_encodePartToFile($fh); 
Note: See TracChangeset for help on using the changeset viewer.