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:
parent
2017cfeb72
commit
7aec8c49d6
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user