의 미러
https://github.com/friendica/friendica
synced 2025-09-07 21:21:52 +02:00
Possibly fix a fatal error
This commit is contained in:
부모
ddb6029add
커밋
7441bd90c8
1개의 변경된 파일과 10개의 추가작업 그리고 1개의 파일을 삭제
|
@ -207,7 +207,12 @@ class Contact
|
|||
if (empty($cid)) {
|
||||
return [];
|
||||
}
|
||||
return self::getById($cid, $fields);
|
||||
|
||||
$contact = self::getById($cid, $fields);
|
||||
if (empty($contact)) {
|
||||
return [];
|
||||
}
|
||||
return $contact;
|
||||
}
|
||||
|
||||
// Add internal fields
|
||||
|
@ -238,6 +243,10 @@ class Contact
|
|||
$contact = DBA::selectFirst('contact', $fields, $condition, $options);
|
||||
}
|
||||
|
||||
if (!DBA::isResult($contact)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Update the contact in the background if needed
|
||||
if ((($contact['updated'] < DateTimeFormat::utc('now -7 days')) || empty($contact['avatar'])) &&
|
||||
in_array($contact['network'], Protocol::FEDERATED)) {
|
||||
|
|
불러오는 중…
테이블 추가
Add a link
Reference in a new issue