]> git.mxchange.org Git - friendica.git/commitdiff
Increase the year
authorMichael <heluecht@pirati.ca>
Sun, 1 Jan 2023 15:14:45 +0000 (15:14 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 1 Jan 2023 15:14:45 +0000 (15:14 +0000)
src/Core/Worker/Cron.php
src/Worker/Notifier.php

index bc6afc32e2aa4133c920c7fff6d20f13331bfa79..d45592f37f9f3260f4220d89b7dfa5028d089f0d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
index c6a6ae4f176930b9bfcdf2aac8eacdcca54f8c12..1cb1cad9271613967282f10325ecce84daa1fa75 100644 (file)
@@ -816,7 +816,11 @@ class Notifier
                }
 
                // Fill the item cache
-               ActivityPub\Transmitter::createCachedActivityFromItem($target_item['id'], true);
+               $cache = ActivityPub\Transmitter::createCachedActivityFromItem($target_item['id'], true);
+               if (empty($cache)) {
+                       Logger::info('Item cache was not created. The post will not be distributed.', ['id' => $target_item['id'], 'url' => $target_item['uri'], 'verb' => $target_item['verb']]);
+                       return ['count' => 0, 'contacts' => []];
+               }
 
                $delivery_queue_count = 0;
                $contacts = [];