]> git.mxchange.org Git - friendica.git/commitdiff
Remove unused return value of Contact::updateAvatar
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Mar 2020 15:39:48 +0000 (11:39 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Mar 2020 15:39:48 +0000 (11:39 -0400)
src/Model/Contact.php

index f60a362c57689ce22b3f14e88f6f98101db23736..f199012f1f6deac692bd7f9ca8e176f5eef4e071 100644 (file)
@@ -1911,7 +1911,7 @@ class Contact
         * @param int    $cid    Contact id
         * @param bool   $force  force picture update
         *
-        * @return array Returns array of the different avatar sizes
+        * @return void
         * @throws HTTPException\InternalServerErrorException
         * @throws HTTPException\NotFoundException
         * @throws \ImagickException
@@ -1920,8 +1920,7 @@ class Contact
        {
                $contact = DBA::selectFirst('contact', ['avatar', 'photo', 'thumb', 'micro', 'nurl'], ['id' => $cid, 'self' => false]);
                if (!DBA::isResult($contact)) {
-                       Logger::error('Contact not found', ['cid' => $cid]);
-                       throw new HTTPException\NotFoundException('Contact not found');
+                       return;
                }
 
                $data = [
@@ -1952,12 +1951,8 @@ class Contact
                                                DBA::update('contact', $fields, ['id' => $pcontact['id']]);
                                        }
                                }
-
-                               return $photos;
                        }
                }
-
-               return $data;
        }
 
        /**