Browse Source

数据校验

541469799@qq.com 10 tháng trước cách đây
mục cha
commit
178051013e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/index/controller/Index.php

+ 1 - 1
app/index/controller/Index.php

@@ -144,7 +144,7 @@ class Index extends Controller
 
         $goodsModel = new GoodsModel();
         $goods = $goodsModel->getDetails($goodsId);
-        if (empty($goods) || $goods['status'] != 200){
+        if (empty($goods) || (isset($goods['status']) && $goods['status'] == 500)){
             return \view('/error');
         }
         $goods = $goods->toArray();