Fix uninitialised variable warning.

This commit is contained in:
Andrew McMillan 2008-09-16 09:47:57 +12:00
parent 0087235de2
commit fe7ab1c5b2

View File

@ -64,11 +64,13 @@ class CalDAVPrincipal
global $session, $c;
if ( $parameters == null ) return false;
$this->by_email = false;
if ( is_int($parameters) ) {
dbg_error_log( "principal", "Principal: %d", $parameters );
$usr = getUserByID($parameters);
}
else if ( is_array($parameters) ) {
if ( ! isset($parameters['options']['allow_by_email']) ) $parameters['options']['allow_by_email'] = false;
if ( isset($parameters['username']) ) {
$usr = getUserByName($parameters['username']);
}