From ddfe2251668b5d57cd3af87fac6016cd0c608b17 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 3 Apr 2023 12:50:05 -0500 Subject: [PATCH] Calendar: Fix form to edit personal event with invitations - refs BT#20637 --- main/inc/lib/agenda.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index 7dcafa6c69..d46c261505 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -2844,7 +2844,7 @@ class Agenda $id = isset($params['id']) ? (int) $params['id'] : 0; $em = Database::getManager(); - $personalEvent = $id ? $em->find('ChamiloCoreBundle:PersonalAgenda', $id) : null; + $personalEvent = 'personal' === $this->type && $id ? $em->find('ChamiloCoreBundle:PersonalAgenda', $id) : null; $url = api_get_self().'?action='.$action.'&id='.$id.'&type='.$this->type; if ($this->type == 'course') {