Ignore:
Timestamp:
2007/08/24 22:20:19 (17 years ago)
Author:
nanasess
Message:

未定義変数を修正

File:
1 edited

Legend:

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

    r15177 r15356  
    7777        $max = $this->getMax(); 
    7878        for($i = 0; $i <= $max; $i++) { 
    79             if($_SESSION[$this->key][$i]['id'] == $id) { 
     79            if(isset($_SESSION[$this->key][$i]['id'])  
     80               && $_SESSION[$this->key][$i]['id'] == $id) { 
     81 
    8082                // 税込み合計 
    8183                $price = $_SESSION[$this->key][$i]['price']; 
     
    9395        $max = $this->getMax(); 
    9496        for($i = 0; $i <= $max; $i++) { 
    95             if($_SESSION[$this->key][$i]['id'] == $id) { 
     97            if(isset($_SESSION[$this->key][$i]['id'])  
     98               && $_SESSION[$this->key][$i]['id'] == $id) { 
    9699                $_SESSION[$this->key][$i][$key] = $val; 
    97100            } 
     
    133136        $max = $this->getMax(); 
    134137        for($i = 0; $i <= $max; $i++) { 
     138 
     139            if (!isset($_SESSION[$this->key][$i]['price'])) { 
     140                $_SESSION[$this->key][$i]['price'] = ""; 
     141            } 
    135142            $price = $_SESSION[$this->key][$i]['price']; 
     143 
     144            if (!isset($_SESSION[$this->key][$i]['quantity'])) { 
     145                $_SESSION[$this->key][$i]['quantity'] = ""; 
     146            } 
    136147            $quantity = $_SESSION[$this->key][$i]['quantity']; 
     148 
    137149            $pre_tax = SC_Utils::sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']); 
    138150            $total+= ($pre_tax * $quantity); 
     
    163175            $price = $_SESSION[$this->key][$i]['price']; 
    164176            $quantity = $_SESSION[$this->key][$i]['quantity']; 
     177 
     178            if (!isset($_SESSION[$this->key][$i]['point_rate'])) { 
     179                $_SESSION[$this->key][$i]['point_rate'] = ""; 
     180            } 
    165181            $point_rate = $_SESSION[$this->key][$i]['point_rate']; 
     182 
     183            if (!isset($_SESSION[$this->key][$i]['id'][0])) { 
     184                $_SESSION[$this->key][$i]['id'][0] = ""; 
     185            } 
    166186            $id = $_SESSION[$this->key][$i]['id'][0]; 
    167187            $point = SC_Utils_Ex::sfPrePoint($price, $point_rate, POINT_RULE, $id); 
     
    247267        $max = $this->getMax(); 
    248268        for($i = 0; $i <= $max; $i++) { 
    249             if($_SESSION[$this->key][$i]['cart_no'] != "") { 
     269            if(isset($_SESSION[$this->key][$i]['cart_no'])  
     270               && $_SESSION[$this->key][$i]['cart_no'] != "") { 
    250271                $arrRet[] = $_SESSION[$this->key][$i]; 
    251272            } 
Note: See TracChangeset for help on using the changeset viewer.