]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Merge pull request #10260 from annando/fatal
[friendica.git] / src / Protocol / DFRN.php
index d20b8949b89aaae37baae0b584f4e1fb18d64ad9..194fa43fdd4fc51ac537566ba1aa55d45789bfb3 100644 (file)
@@ -899,7 +899,7 @@ class DFRN
                        $entry->setAttribute("xmlns:statusnet", ActivityNamespace::STATUSNET);
                }
 
-               $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
+               $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body'] ?? '');
 
                if ($item['private'] == Item::PRIVATE) {
                        $body = Item::fixPrivatePhotos($body, $owner['uid'], $item, $cid);
@@ -1272,7 +1272,7 @@ class DFRN
 
                        switch ($rino_remote_version) {
                                case 1:
-                                       $key = openssl_random_pseudo_bytes(16);
+                                       $key = random_bytes(16);
                                        $data = self::aesEncrypt($postvars['data'], $key);
                                        break;