Răsfoiți Sursa

:bug: 无 channel id 报错

visuddhinanda 4 ani în urmă
părinte
comite
d65d453964
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      app/article/get.php

+ 6 - 1
app/article/get.php

@@ -12,7 +12,12 @@ require_once "../article/function.php";
 
 if(isset($_GET["id"])){
 	//查询权限
-	$collectionId = $_GET["collection_id"];
+	if(isset($_GET["collection_id"])){
+		$collectionId = $_GET["collection_id"];
+	}
+	else{
+		$collectionId = "";
+	}
 	$redis = redis_connect();
 	$article = new Article($redis); 
 	$power = $article->getPower($_GET["id"],$collectionId);