mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Fix warning "Trying to access array offset on value of type bool"
This commit is contained in:
parent
4917380716
commit
b915252e7e
4 changed files with 18 additions and 3 deletions
|
@ -3357,6 +3357,16 @@ class Contact
|
|||
'writable' => 1,
|
||||
]);
|
||||
|
||||
if (!$contact_id) {
|
||||
DI::logger()->warning('Contact had not been added', ['url' => $url, 'uid' => $importer['uid']]);
|
||||
$contact_record = DBA::selectFirst('contact', ['id'], ['nurl' => Strings::normaliseLink($url), 'uid' => $importer['uid']]);
|
||||
if (empty($contact_record['id'])) {
|
||||
DI::logger()->error('Contact had not been found', ['url' => $url, 'uid' => $importer['uid']]);
|
||||
return null;
|
||||
}
|
||||
$contact_id = $contact_record['id'];
|
||||
}
|
||||
|
||||
// Ensure to always have the correct network type, independent from the connection request method
|
||||
self::updateFromProbe($contact_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue