瀏覽代碼

type 不加 cp

visuddhinanda 2 年之前
父節點
當前提交
a2f9fc5635
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);