mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:50:12 +00:00
Fix several notices
This commit is contained in:
parent
3842f02b02
commit
62367923e0
3 changed files with 12 additions and 6 deletions
|
@ -493,9 +493,13 @@ class GServer
|
|||
|
||||
// Detect the directory type
|
||||
$serverdata['directory-type'] = self::DT_NONE;
|
||||
$serverdata = self::checkPoCo($url, $serverdata);
|
||||
|
||||
$serverdata = self::checkMastodonDirectory($url, $serverdata);
|
||||
|
||||
if ($serverdata['directory-type'] == self::DT_NONE) {
|
||||
$serverdata = self::checkPoCo($url, $serverdata);
|
||||
}
|
||||
|
||||
// We can't detect the network type. Possibly it is some system that we don't know yet
|
||||
if (empty($serverdata['network'])) {
|
||||
$serverdata['network'] = Protocol::PHANTOM;
|
||||
|
@ -1350,7 +1354,7 @@ class GServer
|
|||
$contact = Contact::selectFirst(['id'], ['uid' => 0, 'failed' => false, 'gsid' => $gserver['id']]);
|
||||
|
||||
// Via probing we can be sure that the server is responding
|
||||
if (Contact::updateFromProbe($contact['id'])) {
|
||||
if (!empty($contact['id']) && Contact::updateFromProbe($contact['id'])) {
|
||||
$contact = Contact::selectFirst(['network', 'failed'], ['id' => $contact['id']]);
|
||||
if (!$contact['failed'] && in_array($contact['network'], Protocol::FEDERATED)) {
|
||||
$serverdata['network'] = $contact['network'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue