summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 442277c..0a342da 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -265,7 +265,7 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
$cards[] = array(
'id' => $contact['uid'],
'uri' => $contact['uid'] . '.vcf',
- 'lastmodified' => $contact['changed']->format('U'),
+ 'lastmodified' => is_a($contact['changed'], 'DateTime') ? $contact['changed']->format('U') : null,
'etag' => self::_get_etag($contact),
'size' => $contact['_size'],
);
@@ -304,7 +304,7 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
return array(
'id' => $contact['uid'],
'uri' => $contact['uid'] . '.vcf',
- 'lastmodified' => $contact['changed']->format('U'),
+ 'lastmodified' => is_a($contact['changed'], 'DateTime') ? $contact['changed']->format('U') : null,
'carddata' => $this->_to_vcard($contact),
'etag' => self::_get_etag($contact),
);