Explorar el Código

句子参数个数不对输出错误信息

visuddhinanda hace 2 años
padre
commit
26cb5a6fed
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      app/Http/Api/TemplateRender.php

+ 3 - 0
app/Http/Api/TemplateRender.php

@@ -220,6 +220,9 @@ class TemplateRender{
         }
         $Sent = new CorpusController();
         $props = $Sent->getSentTpl($sentId,$channels,$this->mode,true);
+        if($props === false){
+            $props['error']="句子模版渲染错误。句子参数个数不符。应该是四个。";
+        }
         if($this->mode==='read'){
             $tpl = "sentread";
         }else{