]> git.mxchange.org Git - friendica.git/blobdiff - src/Contact/FriendSuggest/Repository/FriendSuggest.php
Add previous exception to unexpected worker exception logging
[friendica.git] / src / Contact / FriendSuggest / Repository / FriendSuggest.php
index b83729922435deaa5e9ea39460ad6cad03f5d98f..7423b11508dddaccecc575bc34e2d61d945d5a45 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -81,7 +81,7 @@ class FriendSuggest extends BaseRepository
         */
        private function select(array $condition, array $params = []): Collection\FriendSuggests
        {
-               return parent::_select($condition, $params);
+               return new Collection\FriendSuggests(parent::_select($condition, $params)->getArrayCopy());
        }
 
        /**
@@ -130,7 +130,7 @@ class FriendSuggest extends BaseRepository
 
                        if ($fsuggest->id) {
                                $this->db->update(self::$table_name, $fields, ['id' => $fsuggest->id]);
-                               return $this->factory->createFromTableRow($fields);
+                               return $this->selectOneById($fsuggest->id);
                        } else {
                                $this->db->insert(self::$table_name, $fields);
                                return $this->selectOneById($this->db->lastInsertId());
@@ -141,7 +141,7 @@ class FriendSuggest extends BaseRepository
        }
 
        /**
-        * @param Collection\FriendSuggest $fsuggests
+        * @param Collection\FriendSuggests $fsuggests
         *
         * @return bool
         *