From 41ec057813a9259dca10e179dba8ee6dca2774ba Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 11 Jul 2017 17:34:38 +0000 Subject: [PATCH] Avoid "Invalid argument" warning in probing. --- src/Network/Probe.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 9b559304d6..9e5f1b8f89 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -827,9 +827,11 @@ class Probe { } } - foreach ($webfinger["aliases"] as $alias) { - if (substr($alias, 0, 5) == 'acct:') { - $data["addr"] = substr($alias, 5); + if (is_array($webfinger["aliases"])) { + foreach ($webfinger["aliases"] as $alias) { + if (substr($alias, 0, 5) == 'acct:') { + $data["addr"] = substr($alias, 5); + } } } -- 2.39.5