From 395d14d85dde6ead3b8ffc0da08a4fff014e436c Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 11 Jun 2012 18:27:38 +1200 Subject: [PATCH] Avoid using unassigned element. --- inc/DAVPrincipal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DAVPrincipal.php b/inc/DAVPrincipal.php index d601c420..5318a13a 100644 --- a/inc/DAVPrincipal.php +++ b/inc/DAVPrincipal.php @@ -405,7 +405,7 @@ class DAVPrincipal extends Principal if ( !isset($this->privileges) ) $this->privileges = 0; if ( is_string($this->privileges) ) $this->privileges = bindec( $this->privileges ); if ( $this->_is_group ) { - if ( in_array($session->principal->url(), $this->GroupMemberSet()) ) { + if ( isset($session->principal) && in_array($session->principal->url(), $this->GroupMemberSet()) ) { $this->privileges |= privilege_to_bits( array('DAV::read', 'DAV::read-current-user-privilege-set') ); } }