Continued:

- moved if() block to suggested position by MrPetovan, for me I want to have all
  conditions checked at the start of the method, e.g. no unwanted null
  references or (in this case) if the URL is blacklisted
- normalized URLs are without SSL, means http://host/path/file.ext so they exist
  only once for contacts and servers (aka. instances)
- documented returned type `void`
This commit is contained in:
Roland Häder 2023-01-21 01:04:31 +01:00
parent ba08692403
commit 27969e8ca6
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
2 changed files with 10 additions and 9 deletions

View file

@ -63,7 +63,7 @@ class UpdateServerPeers
}
++$total;
if (DBA::exists('gserver', ['nurl' => Strings::normaliseLink('https://' . $peer)])) {
if (DBA::exists('gserver', ['nurl' => 'http://' . $peer])) {
// We already know this server
continue;
}