Avaoid warning when no valid data could be read

This commit is contained in:
Michael 2018-05-18 16:07:55 +00:00
parent 2460cbc09e
commit 5d708fd9a9

View file

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