]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Processor.php
Return early if an URI id cannot be obtained in ActivityPub\Processor::createItem
[friendica.git] / src / Protocol / ActivityPub / Processor.php
index 088a10e90845e34eef8fd9df66a7644adee558e4..f60eea7122211d3aeafa67bbfe50a25bda82e9c0 100644 (file)
@@ -327,6 +327,10 @@ class Processor
                $item['guid'] = $activity['diaspora:guid'] ?: $guid;
 
                $item['uri-id'] = ItemURI::insert(['uri' => $item['uri'], 'guid' => $item['guid']]);
+               if (empty($item['uri-id'])) {
+                       Logger::warning('Unable to get a uri-id for an item uri', ['uri' => $item['uri'], 'guid' => $item['guid']]);
+                       return [];
+               }
 
                $item = self::processContent($activity, $item);
                if (empty($item)) {