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不能为空");
     }