From 5d708fd9a9744e82a0446cd0e8ba57b6ec9b5cf1 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 18 May 2018 16:07:55 +0000 Subject: [PATCH] Avaoid warning when no valid data could be read --- src/Protocol/PortableContact.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index f824be40f0..35052fe679 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -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); + } } } -- 2.39.5