Avoid notices whwn creating events

This commit is contained in:
Michael 2021-04-11 06:53:01 +00:00
parent db414c8212
commit 5b2c4d70be
2 changed files with 3 additions and 4 deletions

View file

@ -293,11 +293,10 @@ class Event
}
$private = intval($arr['private'] ?? 0);
$conditions = ['uid' => $event['uid']];
if ($event['cid']) {
$conditions['id'] = $event['cid'];
$conditions = ['id' => $event['cid']];
} else {
$conditions['self'] = true;
$conditions = ['uid' => $event['uid'], 'self' => true];
}
$contact = DBA::selectFirst('contact', [], $conditions);