瀏覽代碼

brigadier nullable fix

Alexander Musikhin 7 月之前
父節點
當前提交
68b8a3123c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Http/Controllers/Controller.php

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

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