Add isset check for PHOTO in SocialApiService

Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
Anna Larch 2021-11-22 16:32:49 +01:00
parent 714f079c19
commit 344730d161
1 changed files with 2 additions and 1 deletions

View File

@ -227,9 +227,10 @@ class SocialApiService {
$changes = [];
$changes['URI'] = $contact['URI'];
$changes['VERSION'] = $contact['VERSION'];
$this->addPhoto($changes, $imageType, base64_encode($socialdata));
if (isset($contact['PHOTO']) && $changes['PHOTO'] === $contact['PHOTO']) {
if (isset($changes['PHOTO'], $contact['PHOTO']) && $changes['PHOTO'] === $contact['PHOTO']) {
return new JSONResponse([], Http::STATUS_NOT_MODIFIED);
}