Changeset 4312 for sandbox

Show
Ignore:
Timestamp:
06/20/2008 10:46:49 AM (3 months ago)
Author:
zero
Message:

getRequestArgument() 함수에서 배열로 된 쿠키값을 잘못 처리하는 문제 수정 (simulz님 감사~)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • sandbox/classes/context/Context.class.php

    r4290 r4312  
    479479            foreach($_REQUEST as $key => $val) { 
    480480                if($key == "page" || $key == "cpage" || substr($key,-3)=="srl") $val = (int)$val; 
    481                 if(is_array($val)) { 
    482                     for($i=0;$i<count($val);$i++) { 
    483                         if(get_magic_quotes_gpc()) $val[$i] = stripslashes($val[$i]); 
    484                         $val[$i] = trim($val[$i]); 
     481                else if(is_array($val) && count($val) ) { 
     482                    foreach($val as $k => $v) { 
     483                        if(get_magic_quotes_gpc()) $v = stripslashes($v); 
     484                        $v = trim($v); 
     485                        $val[$k] = $v; 
    485486                    } 
    486487                } else {