Merge pull request #3578 from annando/probe-warning

Avoid "Invalid argument" warning in probing.
This commit is contained in:
Tobias Diekershoff 2017-07-12 07:21:31 +02:00 committed by GitHub
commit c54b7e84ab

View file

@ -827,9 +827,11 @@ class Probe {
} }
} }
foreach ($webfinger["aliases"] as $alias) { if (is_array($webfinger["aliases"])) {
if (substr($alias, 0, 5) == 'acct:') { foreach ($webfinger["aliases"] as $alias) {
$data["addr"] = substr($alias, 5); if (substr($alias, 0, 5) == 'acct:') {
$data["addr"] = substr($alias, 5);
}
} }
} }