Changeset 326

Show
Ignore:
Timestamp:
12/20/07 16:02:27 (7 months ago)
Author:
hans
Message:

Refs #201 - Fixing argument parsing from bug introduced in [323]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3/classes/phing/Phing.php

    r323 r326  
    316316                 
    317317                // 3) Finally, cycle through to parse remaining args 
    318                 foreach ($args as $i => $arg) { 
     318                //  
     319                $keys = array_keys($args); // Use keys and iterate to max(keys) since there may be some gaps 
     320                for($i=0, $max = max(array_keys($args)); $i <= $max; $i++) { 
     321                         
     322                        if (!array_key_exists($i, $args[$i])) { 
     323                                // skip this argument, since it must have been removed above. 
     324                                continue; 
     325                        } 
     326                         
     327                        $arg = $args[$i]; 
    319328                         
    320329                        if ($arg == "-logfile") {