summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index 414805a..eec0bf3 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -885,8 +885,8 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
break;
case 'PHOTO':
- $param = $prop->parameters[0];
- if ($param->value && strtolower($param->value) == 'b' || strtolower($param->name) == 'base64') {
+ $param = $prop->offsetGet('encoding') ?: $prop->parameters[0];
+ if ($param->value && (strtolower($param->value) == 'b' || strtolower($param->value) == 'base64') || strtolower($param->name) == 'base64') {
$contact['photo'] = base64_decode($prop->value);
}
break;