Merge pull request #5082 from annando/federation-warning

Avoid warning when no valid data could be read
This commit is contained in:
Hypolite Petovan 2018-05-18 12:26:08 -04:00 committed by GitHub
commit 931e9182ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1527,10 +1527,12 @@ class PortableContact
if ($serverdata) { if ($serverdata) {
$servers = json_decode($serverdata); $servers = json_decode($serverdata);
if (is_array($servers->pods)) {
foreach ($servers->pods as $server) { foreach ($servers->pods as $server) {
Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", "https://".$server->host); Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", "https://".$server->host);
} }
} }
}
// Disvover Mastodon servers // Disvover Mastodon servers
if (!Config::get('system', 'ostatus_disabled')) { if (!Config::get('system', 'ostatus_disabled')) {