]> git.mxchange.org Git - friendica.git/commitdiff
Reverted change
authorMichael <heluecht@pirati.ca>
Sat, 19 Feb 2022 20:32:19 +0000 (20:32 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 19 Feb 2022 20:32:19 +0000 (20:32 +0000)
src/Protocol/ActivityPub/Transmitter.php

index 0e16884b40721318d496d0f92543f0154a57a530..c65265396ed5068dda232f0fd1d0550e418b974f 100644 (file)
@@ -702,13 +702,15 @@ class Transmitter
                }
 
                foreach (['to' => Tag::TO, 'cc' => Tag::CC, 'bcc' => Tag::BCC] as $element => $type) {
-                       foreach ($receivers[$element] as $receiver) {
-                               if ($receiver == ActivityPub::PUBLIC_COLLECTION) {
-                                       $name = Receiver::PUBLIC_COLLECTION;
-                               } else {
-                                       $name = trim(parse_url($receiver, PHP_URL_PATH), '/');
+                       if (!empty($receivers[$element])) {
+                               foreach ($receivers[$element] as $receiver) {
+                                       if ($receiver == ActivityPub::PUBLIC_COLLECTION) {
+                                               $name = Receiver::PUBLIC_COLLECTION;
+                                       } else {
+                                               $name = trim(parse_url($receiver, PHP_URL_PATH), '/');
+                                       }
+                                       Tag::store($item['uri-id'], $type, $name, $receiver);
                                }
-                               Tag::store($item['uri-id'], $type, $name, $receiver);
                        }
                }