Browse Source

手持上架添加参数类型校验

haozi 4 years ago
parent
commit
c6c496a59d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/HandInStorageController.php

+ 1 - 1
app/Http/Controllers/HandInStorageController.php

@@ -181,7 +181,7 @@ class HandInStorageController extends Controller
     {
         $this->gate("入库管理-手持入库-上架");
         $info=$request->input('info');
-        if (!$info['location']||!$info['amount']||!$info['barCode']) $this->error('参数错误');
+        if (!$info['location']||!$info['amount']||!$info['barCode'] || gettype($info['amount'])==='string') $this->error('参数错误');
         if (count($request->input('checkData'))==0) $this->error('请勾选要上架任务');
         $checkData=$request->input('checkData')[0];
         /** @var HandInStorageService $handInStorageService  */