Skip to content

Commit

Permalink
Fix more PHP notices
Browse files Browse the repository at this point in the history
  • Loading branch information
temistokles authored Jan 10, 2018
1 parent 5092dd4 commit c559780
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/CalDAVClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -733,12 +733,14 @@ function FindCalendarHome( $recursed=false ) {
}

$calendar_home = array();
foreach( $this->xmltags['urn:ietf:params:xml:ns:caldav:calendar-home-set'] AS $k => $v ) {
if ( $this->xmlnodes[$v]['type'] != 'open' ) continue;
while( $this->xmlnodes[++$v]['type'] != 'close' && $this->xmlnodes[$v]['tag'] != 'urn:ietf:params:xml:ns:caldav:calendar-home-set' ) {
// printf( "Tag: '%s' = '%s'\n", $this->xmlnodes[$v]['tag'], $this->xmlnodes[$v]['value']);
if ( $this->xmlnodes[$v]['tag'] == 'DAV::href' && isset($this->xmlnodes[$v]['value']) )
$calendar_home[] = rawurldecode($this->xmlnodes[$v]['value']);
if (isset($this->xamltags['urn:ietf:params:xml:ns:caldav:calendar-home-set'])) {
foreach( $this->xmltags['urn:ietf:params:xml:ns:caldav:calendar-home-set'] AS $k => $v ) {
if ( $this->xmlnodes[$v]['type'] != 'open' ) continue;
while( $this->xmlnodes[++$v]['type'] != 'close' && $this->xmlnodes[$v]['tag'] != 'urn:ietf:params:xml:ns:caldav:calendar-home-set' ) {
// printf( "Tag: '%s' = '%s'\n", $this->xmlnodes[$v]['tag'], $this->xmlnodes[$v]['value']);
if ( $this->xmlnodes[$v]['tag'] == 'DAV::href' && isset($this->xmlnodes[$v]['value']) )
$calendar_home[] = rawurldecode($this->xmlnodes[$v]['value']);
}
}
}

Expand Down

0 comments on commit c559780

Please sign in to comment.