Browse Source

type 不加 cp

visuddhinanda 2 năm trước cách đây
mục cha
commit
a2f9fc5635
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Http/Controllers/WbwLookupController.php

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

@@ -204,7 +204,7 @@ class WbwLookupController extends Controller
                         }
                         //将全部结果加上得分放入数组
                         $parent = $this->insertValue([$value->parent],$parent,$increment);
-                        if($value->type !== ".cp."){
+                        if(!empty($value->type) && $value->type !== ".cp."){
                             $case = $this->insertValue([$value->type."#".$value->grammar],$case,$increment);
                         }
                         $factors = $this->insertValue([$value->factors],$factors,$increment);