Skip to content

Commit

Permalink
dns_get_record waring fix
Browse files Browse the repository at this point in the history
added dictionary key checks before
  • Loading branch information
hudecof committed Aug 8, 2019
1 parent 7ff9574 commit 1c4c3a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions carddav_discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public function find_addressbooks($url, $user, $password)

// now check each of them until we find something (or don't)
foreach($services as $service) {
if (!array_key_exists('paths', $service)) {
continue;
}
$cdfopen_cfg['url'] = $service['baseurl'];

foreach($service['paths'] as $path) {
Expand Down Expand Up @@ -244,6 +247,9 @@ private function find_servers($host, $ssl)
private function find_baseurls($services)
{{{
foreach($services as &$service) {
if (!array_key_exists('dnssrv', $service)) {
continue;
}
$baseurl = $service['baseurl'];
$dnssrv = $service['dnssrv'];

Expand Down

0 comments on commit 1c4c3a5

Please sign in to comment.