Ignore:
Timestamp:
2011/11/13 23:27:06 (12 years ago)
Author:
Seasoft
Message:

#1550 (例外エラーと扱うべき状況では、例外エラーを発生させる)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r21311 r21331  
    761761            $changed_no = $objFormParam->getValue('no'); 
    762762        } 
     763        // FXIME バリデーションを通さず $objFormParam の値で DB 問い合わせしている。(管理機能ため、さほど問題は無いと思うものの…) 
     764 
     765        // 商品規格IDが指定されていない場合、例外エラーを発生 
     766        if (strlen($product_class_id) === 0) { 
     767            SC_Utils_Ex::sfDispException('商品規格指定なし'); 
     768        } 
    763769 
    764770        // 選択済みの商品であれば数量を1増やす 
     
    781787            $objProduct = new SC_Product_Ex(); 
    782788            $arrProduct = $objProduct->getDetailAndProductsClass($product_class_id); 
     789 
     790            // 一致する商品規格がない場合、例外エラーを発生 
     791            if (empty($arrProduct)) { 
     792                SC_Utils_Ex::sfDispException('商品規格一致なし'); 
     793            } 
     794 
    783795            $arrProduct['quantity'] = 1; 
    784796            $arrProduct['price'] = $arrProduct['price02']; 
Note: See TracChangeset for help on using the changeset viewer.