Add error handling for missing contacts
This commit is contained in:
@@ -637,6 +637,7 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||
foreach ($r as $row) {
|
||||
$contact = get_contact_details_by_url($row['author-link'], 0);
|
||||
|
||||
if (count($contact) > 0) {
|
||||
$unknown_contacts[] = array(
|
||||
'type' => 'cu',
|
||||
'photo' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
|
||||
@@ -649,6 +650,7 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$items = array_merge($items, $unknown_contacts);
|
||||
$tot += count($unknown_contacts);
|
||||
|
||||
Reference in New Issue
Block a user