diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 5646f945..8fd6826f 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -200,6 +200,10 @@ class ShopController extends BaseAuthedController } $goods = mt\ShopGoods::get($id); + if (!$goods) { + $this->_rspErr(1, 'id is invalid. {$id}'); + } + if ($goods['shop_id'] == 9 && $goods_num > 1) { $this->_rspErr(1, 'goods_num is invalid'); }