]> git.mxchange.org Git - friendica.git/commitdiff
Avoid "Invalid argument" warning in probing.
authorMichael <heluecht@pirati.ca>
Tue, 11 Jul 2017 17:34:38 +0000 (17:34 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 11 Jul 2017 17:34:38 +0000 (17:34 +0000)
src/Network/Probe.php

index 9b559304d66cbc19c0ce60f112976733b63d9386..9e5f1b8f89c57ee85ead1a99bd7ff4eb40833b84 100644 (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);
+                               }
                        }
                }