]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Worker/UpdateServerDirectory.php
authorMichael Vogel <icarus@dabo.de>
Mon, 3 Aug 2020 16:58:12 +0000 (18:58 +0200)
committerGitHub <noreply@github.com>
Mon, 3 Aug 2020 16:58:12 +0000 (18:58 +0200)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Worker/UpdateServerDirectory.php

index 90bd5c50a4de9242bf32c153059c773279e2b15b..1244e2c2c0737a57e27eed1a3df1d21c2c5e4ca5 100644 (file)
@@ -60,11 +60,8 @@ class UpdateServerDirectory
                Logger::info('PoCo discovery started', ['poco' => $gserver['poco']]);
 
                $urls = [];
-               foreach ($contacts['entry'] as $entry) {
-                       if (empty($entry['urls'])) {
-                               continue;
-                       }
-                       foreach ($entry['urls'] as $url_entry) {
+               foreach (array_column($contacts['entry'], 'urls') as $urls) {
+                       foreach ($urls as $url_entry) {
                                if (empty($url_entry['type']) || empty($url_entry['value'])) {
                                        continue;
                                }