Show
Ignore:
Timestamp:
09/03/08 15:30:09 (4 months ago)
Author:
MattRead
Message:

fixing recursion prob with move()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/formui.php

    r2375 r2436  
    220220        $controls = array(); 
    221221        foreach($source->container->controls as $name => $ctrl) { 
    222             if($ctrl == $source) { 
     222            if($ctrl === $source) { 
    223223                $source_name = $name; 
    224224                continue; 
     
    229229 
    230230        // Insert the source control into the destination control's container's list of controls in the correct location 
    231         $target_index = array_search($target, array_values($target->container->controls)); 
     231        $target_index = array_search($target, array_values($target->container->controls), true); 
    232232        $left_slice= array_slice($target->container->controls, 0, ($target_index + $offset), true); 
    233233        $right_slice= array_slice($target->container->controls, ($target_index + $offset), count($target->container->controls), true);