* Calendar/CalDAV: fixed SQL error on ctag generation, if no ACL rights for requested group calendar exists

This commit is contained in:
Ralf Becker 2011-05-23 14:43:47 +00:00
parent fbb5551dca
commit c15ba47b5f

View File

@ -1937,7 +1937,7 @@ class calendar_bo
// resolve users to add memberships for users and members for groups
$users = $this->resolve_users($user);
$ctag = $this->so->get_ctag($users, $filter == 'owner');
$ctag = $users ? $this->so->get_ctag($users, $filter == 'owner') : 0; // no rights, return 0 as ctag (otherwise we get SQL error!)
if ($this->debug > 1) error_log(__METHOD__. "($user, '$filter') = $ctag = ".date('Y-m-d H:i:s',$ctag)." took ".(microtime(true)-$startime)." secs");
return $ctag;