Ignore:
Timestamp:
2011/03/20 15:49:00 (13 years ago)
Author:
kotani
Message:

#1183 ([フロント]商品一覧・詳細ページ:存在しないカテゴリーIDまたは商品IDをGETパラメータに与えるとエラー発生)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php

    r20732 r20742  
    179179                $category_id = $this->sfGetCategoryId($_GET['product_id'], $_GET['category_id']); 
    180180                // ROOTカテゴリIDの取得 
    181                 $arrRet = $this->sfGetParents('dtb_category', 'parent_category_id', 'category_id', $category_id); 
    182                 $root_id = isset($arrRet[0]) ? $arrRet[0] : ""; 
     181                if(count($category_id) > 0) { 
     182                    $arrRet = $this->sfGetParents('dtb_category', 'parent_category_id', 'category_id', $category_id); 
     183                    $root_id = isset($arrRet[0]) ? $arrRet[0] : ""; 
     184                } else { 
     185                    $root_id = ""; 
     186                } 
    183187            } else { 
    184188                // ROOTカテゴリIDをなしに設定する 
Note: See TracChangeset for help on using the changeset viewer.