Add error handling for missing contacts
This commit is contained in:
parent
762e8eda7a
commit
6b8ad57399
|
@ -637,16 +637,18 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
foreach ($r as $row) {
|
foreach ($r as $row) {
|
||||||
$contact = get_contact_details_by_url($row['author-link'], 0);
|
$contact = get_contact_details_by_url($row['author-link'], 0);
|
||||||
|
|
||||||
$unknown_contacts[] = array(
|
if (count($contact) > 0) {
|
||||||
'type' => 'cu',
|
$unknown_contacts[] = array(
|
||||||
'photo' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
|
'type' => 'cu',
|
||||||
'name' => htmlentities($contact['name']),
|
'photo' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
|
||||||
'id' => intval($contact['id']),
|
'name' => htmlentities($contact['name']),
|
||||||
'network' => $contact['network'],
|
'id' => intval($contact['id']),
|
||||||
'link' => $contact['url'],
|
'network' => $contact['network'],
|
||||||
'nick' => $contact['nick'],
|
'link' => $contact['url'],
|
||||||
'forum' => false
|
'nick' => $contact['nick'],
|
||||||
);
|
'forum' => false
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue