Avoid "Invalid argument" warning in probing.

This commit is contained in:
Michael 2017-07-11 17:34:38 +00:00
parent 81dedb3f92
commit 41ec057813

View file

@ -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);
}
}
}