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

Fixed error handling in getContact if is not an array.

This commit is contained in:
schuemann 2015-06-14 15:32:36 +02:00
parent 2017cfeb72
commit 7aec8c49d6

View File

@ -138,7 +138,12 @@ class Shared extends Database {
$card = parent::getContact($addressBookId, $id, $options); $card = parent::getContact($addressBookId, $id, $options);
if (!$card) { if (!$card) {
throw new \Exception('Shared Contact not found: ' . implode(',', $id), 404); if (is_array($id)) {
$idstr = implode(", ", $id);
} else {
$idstr = $id;
}
throw new \Exception('Shared Contact not found: ' . $idstr, 404);
} }
$card['permissions'] = $permissions; $card['permissions'] = $permissions;