1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Don't thrown exception in CardDAV backend if card not found

This commit is contained in:
Thomas Tanghus 2014-02-03 17:36:02 +01:00
parent b6439573b0
commit 7ada585112

View File

@ -199,13 +199,16 @@ class Backend extends \Sabre_CardDAV_Backend_Abstract {
try {
$contact = $backend->getContact($id, array('uri' => urldecode($carduri)));
} catch(\Exception $e) {
throw new \Sabre_DAV_Exception_NotFound($e->getMessage());
//throw new \Sabre_DAV_Exception_NotFound($e->getMessage());
\OCP\Util::writeLog('contacts', __METHOD__.', Exception: '. $e->getMessage(), \OCP\Util::DEBUG);
return false;
}
if(is_array($contact) ) {
$contact['etag'] = '"' . md5($contact['carddata']) . '"';
return $contact;
}
throw new \Sabre_DAV_Exception('Error retrieving the card');
//throw new \Sabre_DAV_Exception('Error retrieving the card');
return false;
}
/**