Browse Source

:bug: 无法找到变量$uuid

visuddhinanda 4 years ago
parent
commit
e04086454d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      public/app/article/my_collect_put.php

+ 3 - 1
public/app/article/my_collect_put.php

@@ -20,12 +20,14 @@ if(!isset($_POST["title"])){
 	echo json_encode($respond, JSON_UNESCAPED_UNICODE);
 	exit;
 }
+
+$uuid = UUID::v4();
 add_edit_event(_COLLECTION_NEW_,$uuid);
 
 PDO_Connect(""._FILE_DB_USER_ARTICLE_);
 $query="INSERT INTO collect ( id,  title  , subtitle  , summary , article_list   , owner, lang  , status  , create_time , modify_time , receive_time   )  VALUES  ( ? , ? , ? , ?  , ? , ? , ? , ? , ? , ? , ? ) ";
 $sth = $PDO->prepare($query);
-$uuid = UUID::v4();
+
 $sth->execute(array($uuid , $_POST["title"] , "" ,"", "[]" ,  $_COOKIE["userid"] , "" , $_POST["status"] , mTime() ,  mTime() , mTime() ));
 $respond=array("status"=>0,"message"=>"");
 if (!$sth || ($sth && $sth->errorCode() != 0)) {