]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: The Diaspora signature wasn't stored by nested comments
authorMichael <heluecht@pirati.ca>
Thu, 18 Jan 2018 19:38:51 +0000 (19:38 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 18 Jan 2018 19:38:51 +0000 (19:38 +0000)
mod/item.php

index 96e289a844cad7a2417cbe01ac1accc7aa964b7b..8a9254a4eba4ac4e40a6dbc3efc64d9a90a6bd32 100644 (file)
@@ -836,7 +836,17 @@ function item_post(App $a) {
 
        $post_id = item_store($datarray);
 
-       $datarray["id"] = $post_id;
+       if (!$post_id) {
+               logger("Item wasn't stored.");
+               goaway($return_path);
+       }
+
+       $datarray = dba::selectFirst('item', [], ['id' => $post_id]);
+
+       if (!DBM::is_result($datarray)) {
+               logger("Item with id ".$post_id." couldn't be fetched.");
+               goaway($return_path);
+       }
 
        // update filetags in pconfig
        file_tag_update_pconfig($uid, $categories_old, $categories_new, 'category');