Merge pull request #8965 from annando/notice

Fix Notice: " Undefined index: urls in /src/Worker/UpdateServerDirectory.php on line 64"
This commit is contained in:
Hypolite Petovan
2020-08-03 13:00:08 -04:00
committed by GitHub

View File

@@ -60,8 +60,8 @@ class UpdateServerDirectory
Logger::info('PoCo discovery started', ['poco' => $gserver['poco']]);
$urls = [];
foreach ($contacts['entry'] as $entry) {
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;
}