From 8748aff110053ca741c73d88f80ba1c0260507c4 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 9 Apr 2019 11:44:35 +0000 Subject: [PATCH] Avoid some more warning --- src/Model/Contact.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 94d42945cd..a866df91c5 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1393,7 +1393,9 @@ class Contact extends BaseObject } } - self::updateAvatar($data["photo"], $uid, $contact_id); + if (!empty($data['photo'])) { + self::updateAvatar($data['photo'], $uid, $contact_id); + } $fields = ['url', 'nurl', 'addr', 'alias', 'name', 'nick', 'keywords', 'location', 'about', 'avatar-date', 'pubkey']; $contact = DBA::selectFirst('contact', $fields, ['id' => $contact_id]); -- 2.39.5