Ignore:
Timestamp:
07/08/08 11:04:51 (16 years ago)
Author:
ramonb
Message:

libtoga.php:

  • check size before walking through http vars
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/libtoga.php

    r522 r531  
    3737                $this->metricname       = $httpvars["m"] ? $httpvars["m"] : $getvars["m"];
    3838
    39                 foreach( $httpvars as $httpvar => $httpval )
    40                 {
    41                         if( $httpval )
    42                         {
    43                                 $this->restvars[$httpvar] = $httpval;
    44                         }
    45                 }
    46 
    47                 foreach( $getvars as $getvar => $getval )
    48                 {
    49                         if( $getval )
    50                         {
    51                                 $this->restvars[$getvar] = $getval;
     39                if( count( $httpvars ) > 0 )
     40                {
     41                        foreach( $httpvars as $httpvar => $httpval )
     42                        {
     43                                if( $httpval )
     44                                {
     45                                        $this->restvars[$httpvar] = $httpval;
     46                                }
     47                        }
     48                }
     49
     50                if( count( $getvars ) > 0 )
     51                {
     52                        foreach( $getvars as $getvar => $getval )
     53                        {
     54                                if( $getval )
     55                                {
     56                                        $this->restvars[$getvar] = $getval;
     57                                }
    5258                        }
    5359                }
Note: See TracChangeset for help on using the changeset viewer.