diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index 3f954cf315..06f05ed42c 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -135,9 +135,9 @@ { $this->owner = intval($GLOBALS['owner']); } - elseif(!isset($this->owner) || !$this->owner) + elseif(!@isset($this->owner) || !@$this->owner) { - $this->owner = $GLOBALS['phpgw_info']['user']['account_id']; + $this->owner = intval($GLOBALS['phpgw_info']['user']['account_id']); } $this->prefs['common'] = $GLOBALS['phpgw_info']['user']['preferences']['common']; @@ -783,7 +783,7 @@ } else { - return ($this->grants[$user] & $needed); + return ($this->grants[intval($user)] & $needed); } }