]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Merge pull request #8660 from annando/item-insert
[friendica.git] / src / Protocol / Diaspora.php
index e5afd560248f5f001ce4ff4ad022d221cb00b6f2..243550862be8e93010f310318a87856288619955 100644 (file)
@@ -265,7 +265,7 @@ class Diaspora
                        return $contacts;
                }
 
-               $items = Item::select(['author-id', 'author-link', 'parent-author-link', 'parent-guid'],
+               $items = Item::select(['author-id', 'author-link', 'parent-author-link', 'parent-guid', 'guid'],
                        ['parent' => $item['parent'], 'gravity' => [GRAVITY_COMMENT, GRAVITY_ACTIVITY]]);
                while ($item = DBA::fetch($items)) {
                        $contact = DBA::selectFirst('contact', ['id', 'url', 'name', 'protocol', 'batch', 'network'],
@@ -3139,7 +3139,9 @@ class Diaspora
                $json = json_encode(["iv" => $b_iv, "key" => $b_aes_key]);
 
                $encrypted_key_bundle = "";
-               openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey);
+               if (!@openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey)) {
+                       return false;
+               }
 
                $json_object = json_encode(
                        ["aes_key" => base64_encode($encrypted_key_bundle),