소스 검색

更新语法错误

sandm 1 년 전
부모
커밋
a0e1e59873
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      app/Http/Controllers/Web/Recruit/IndexController.php

+ 4 - 1
app/Http/Controllers/Web/Recruit/IndexController.php

@@ -1017,7 +1017,10 @@ class IndexController extends WebBaseController
         $forms = explode(',', $recruit['forms']);
         if(in_array('expand_special',$forms)){
             $special = $request->input('special');
-            if($special['point_apply'] && ($special['condition'] == '' ) || count($special['condition']) == 0){
+            if($special['point_apply'] && is_array($special['condition']) && count($special['condition']) == 0){
+                return response()->json(['status' => 0,'msg' => '加分条件不能为空']);
+            }
+            if($special['point_apply'] && ($special['condition'] == '' )){
                 return response()->json(['status' => 0,'msg' => '加分条件不能为空']);
             }
         }