summaryrefslogtreecommitdiff
path: root/lib/Kolab/CardDAV/ContactsBackend.php
diff options
context:
space:
mode:
authorThomas <tb@woodcrest.local>2013-10-10 16:23:38 (GMT)
committerThomas <tb@woodcrest.local>2013-10-11 11:44:35 (GMT)
commit5dfcf76244890a30c17db0a7b9e52cc83abc2751 (patch)
tree20e64e71985fdb52c50c8f8ca743f89d644e956b /lib/Kolab/CardDAV/ContactsBackend.php
parent4693477cbe94630c1d33e08edb3506e0adac80c8 (diff)
downloadiRony-5dfcf76244890a30c17db0a7b9e52cc83abc2751.tar.gz
Don't rely on position for photo encoding parameter (#2335)
Diffstat (limited to 'lib/Kolab/CardDAV/ContactsBackend.php')
-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;