From 07dde8deb8944fb149c33f137f7ba01449a05b8a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 9 Mar 2020 11:39:48 -0400 Subject: [PATCH] Remove unused return value of Contact::updateAvatar --- src/Model/Contact.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index f60a362c57..f199012f1f 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -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; } /** -- 2.39.5