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/workflow/inc/class.utils.security.php

    r7655 r7673  
    6868        function SecurityUtils($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) { 
    6969                // make sure user defined arrays are in lowercase 
    70                 for ($i = 0; $i < count($tagsArray); ++$i) $tagsArray[$i] = strtolower($tagsArray[$i]); 
    71                 for ($i = 0; $i < count($attrArray); ++$i) $attrArray[$i] = strtolower($attrArray[$i]); 
     70        $tagsArray_count = count($tagsArray); 
     71                for ($i = 0; $i < $tagsArray_count; ++$i) 
     72            $tagsArray[$i] = strtolower($tagsArray[$i]); 
     73        $attrArray_count = count($attrArray); 
     74                for ($i = 0; $i < $attrArray_count; ++$i) 
     75            $attrArray[$i] = strtolower($attrArray[$i]); 
    7276                // assign to member vars 
    7377                $this->tagsArray = (array) $tagsArray; 
     
    135139                $newSet = array(); 
    136140                // process attributes 
    137                 for ($i = 0; $i <count($attrSet); ++$i) { 
     141        $attrSet_count = count($attrSet); 
     142                for ($i = 0; $i < $attrSet_count; ++$i) { 
    138143                        // skip blank spaces in tag 
    139144                        if (!$attrSet[$i]) continue; 
Note: See TracChangeset for help on using the changeset viewer.