log an error instead of crashing on principal-property-search REPORT without a proper match clause (fix #114)

This commit is contained in:
Florian Schlichting 2017-04-08 14:41:50 +02:00
parent e94d69d3f7
commit 323292eb8c

View File

@ -20,6 +20,10 @@ $where = "";
foreach( $searches AS $k => $search ) {
$qry_props = $search->GetPath('/DAV::property-search/DAV::prop/*'); // There may be many
$match = $search->GetPath('/DAV::property-search/DAV::match'); // There may only be one
if ( empty($match) or !is_object($match[0]) ) {
dbg_error_log("ERROR", "Unable to extract a match clause from '%s'", $search->RenderContent() );
continue;
}
dbg_log_array( "principal", "MATCH", $match, true );
$match = $match[0]->GetContent();
$subwhere = "";