panlumeng 3 년 전
부모
커밋
7a871247c1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/admin/controller/Cat.php

+ 1 - 1
app/admin/controller/Cat.php

@@ -161,7 +161,7 @@ public function create()
     if ($cat_name == "") {
         return error_show(1002, "参数cat_name不能为空");
     }
-    $pid = isset($this->post['pid']) && $this->post['pid'] !== "" ? intval($this->post['pid']) : "";
+    $pid = isset($this->post['pid']) && $this->post['pid'] !== "" ? intval($this->post['pid']) : "0";
     if ($pid === "") {
         return error_show(1002, "参数pid不能为空");
     }