Might as well do the if statement in there as well.

This commit is contained in:
Andrew McMillan 2006-12-09 21:53:39 +13:00
parent d0e9ade678
commit 8edb7a6b9d

View File

@ -377,6 +377,7 @@ class CalDAVRequest
* @param array $unsupported An array of the properties we don't support. * @param array $unsupported An array of the properties we don't support.
*/ */
function UnsupportedRequest( $unsupported ) { function UnsupportedRequest( $unsupported ) {
if ( isset($unsupported) && count($unsupported) > 0 ) {
$badprops = new XMLElement( "prop" ); $badprops = new XMLElement( "prop" );
foreach( $unsupported AS $k => $v ) { foreach( $unsupported AS $k => $v ) {
// Not supported at this point... // Not supported at this point...
@ -387,6 +388,7 @@ class CalDAVRequest
$this->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"'); $this->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
} }
}
/** /**