From: Michael Date: Tue, 11 Jul 2017 17:34:38 +0000 (+0000) Subject: Avoid "Invalid argument" warning in probing. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=41ec057813a9259dca10e179dba8ee6dca2774ba;p=friendica.git Avoid "Invalid argument" warning in probing. --- 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); + } } }