From 05c0f95e692d22939d732984faa825c0ed781736 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 24 Mar 2010 22:14:39 +1300 Subject: [PATCH] Avoid unassigned warning. --- inc/CalDAVPrincipal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/CalDAVPrincipal.php b/inc/CalDAVPrincipal.php index d27dba3c..af70f9ef 100644 --- a/inc/CalDAVPrincipal.php +++ b/inc/CalDAVPrincipal.php @@ -366,7 +366,7 @@ class CalDAVPrincipal @dbg_error_log( 'principal', 'Path split into at least /// %s /// %s /// %s', $path_split[1], $path_split[2], $path_split[3] ); $username = $path_split[1]; - if ( $path_split[1] == 'principals' ) $username = $path_split[3]; + if ( $path_split[1] == 'principals' && isset($path_split[3]) ) $username = $path_split[3]; if ( substr($username,0,1) == '~' ) $username = substr($username,1); if ( isset($options['allow_by_email']) && $options['allow_by_email'] && preg_match( '#^(\S+@\S+[.]\S+)$#', $username) ) {