diff --git a/inc/caldav-REPORT-cardquery.php b/inc/caldav-REPORT-cardquery.php index 968919fd..4115ecd4 100644 --- a/inc/caldav-REPORT-cardquery.php +++ b/inc/caldav-REPORT-cardquery.php @@ -7,7 +7,8 @@ function get_address_properties( $address_data_xml ) { global $address_data_properties; $expansion = $address_data_xml->GetElements(); foreach( $expansion AS $k => $v ) { - $address_data_properties[strtoupper($v->GetAttribute('name'))] = true; + if ( $v instanceof XMLElement ) + $address_data_properties[strtoupper($v->GetAttribute('name'))] = true; } }