소스 검색

brigadier nullable fix

Alexander Musikhin 7 달 전
부모
커밋
b3b1a870cf
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/Http/Controllers/Controller.php

+ 2 - 2
app/Http/Controllers/Controller.php

@@ -72,8 +72,8 @@ class Controller extends BaseController
         foreach ($columns as $column) {
 
             $uniqueValues = $model::query()->distinct()->get($column)->pluck($column)->toArray();
-            if(isset($uniqueValues[0]) && ($uniqueValues[0] == null)) {
-                $uniqueValues = [];
+            foreach ($uniqueValues as $k => $v) {
+                if(!$v) unset($uniqueValues[$k]);
             }
             $result = [];
             foreach ($uniqueValues as $val){