Merge pull request #5082 from annando/federation-warning

Avoid warning when no valid data could be read
pull/5085/head
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
1 changed files with 4 additions and 2 deletions

View File

@ -1527,8 +1527,10 @@ class PortableContact
if ($serverdata) {
$servers = json_decode($serverdata);
foreach ($servers->pods as $server) {
Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", "https://".$server->host);
if (is_array($servers->pods)) {
foreach ($servers->pods as $server) {
Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", "https://".$server->host);
}
}
}