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
commit a6a23802b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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