Ignore:
Timestamp:
2007/09/05 14:30:20 (17 years ago)
Author:
nanasess
Message:

未定義変数の修正

Location:
branches/feature-module-update/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/SC_Cookie.php

    r15609 r15611  
    2424    // クッキー取得 
    2525    function getCookie($key) { 
    26         return $_COOKIE[$key]; 
     26        return isset($_COOKIE[$key]) ? $_COOKIE[$key] : null; 
    2727    } 
    2828} 
  • branches/feature-module-update/data/class/SC_FormParam.php

    r15593 r15611  
    101101 
    102102    function setDBDate($db_date, $year_key = 'year', $month_key = 'month', $day_key = 'day') { 
    103         list($y, $m, $d) = split("[- ]", $db_date); 
    104         $this->setValue($year_key, $y); 
    105         $this->setValue($month_key, $m); 
    106         $this->setValue($day_key, $d); 
     103 
     104        if (!empty($db_date)) { 
     105            list($y, $m, $d) = split("[- ]", $db_date); 
     106            $this->setValue($year_key, $y); 
     107            $this->setValue($month_key, $m); 
     108            $this->setValue($day_key, $d); 
     109        } 
    107110    } 
    108111 
     
    308311            } 
    309312 
    310             // TODO 未定義値の対応... 
     313            /* 
     314             * :XXX: isset() でチェックできない 
     315             */ 
     316            if (empty($this->param[$cnt])) $this->param[$cnt] = ""; 
     317 
    311318            if($this->default[$cnt] != "" && $this->param[$cnt] == "") { 
    312319                $arrRet[$val]['value'] = $this->default[$cnt]; 
Note: See TracChangeset for help on using the changeset viewer.