]> git.mxchange.org Git - friendica.git/commitdiff
Simplified code
authorMichael <heluecht@pirati.ca>
Mon, 18 May 2020 22:34:47 +0000 (22:34 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 18 May 2020 22:34:47 +0000 (22:34 +0000)
src/Model/Item.php

index db569babb21dda8480c6273ad03fd3545024470b..006c70860d18f331737c087e579a4d6607156c73 100644 (file)
@@ -2032,13 +2032,8 @@ class Item
         */
        private static function insertActivity(array $item)
        {
-               $activity_index = self::activityToIndex($item['verb']);
-               if ($activity_index < 0) {
-                       // SHouldn't happen at all
-                       return null;
-               }
-
-               $fields = ['activity' => $activity_index, 'uri-hash' => (string)$item['uri-id'], 'uri-id' => $item['uri-id']];
+               $fields = ['activity' => self::activityToIndex($item['verb']),
+                       'uri-hash' => (string)$item['uri-id'], 'uri-id' => $item['uri-id']];
 
                // To avoid timing problems, we are using locks.
                $locked = DI::lock()->acquire('item_insert_activity');