1.7.05 corrige un bug fatal lorsque l'enrolement est nul

This commit is contained in:
Fred Tempez 2024-03-18 18:14:27 +01:00
parent 548daad047
commit 137c151e19

View File

@ -1878,10 +1878,11 @@ class course extends common
$r = true;
break;
case self::GROUP_EDITOR:
$r = in_array($userId, array_keys($this->getData(['enrolment', $courseId])));
break;
case self::GROUP_MEMBER:
$r = false;
if (!is_null($this->getData(['enrolment', $courseId]))) {
$r = in_array($userId, array_keys($this->getData(['enrolment', $courseId])));
}
break;
// Visiteur non connecté
case self::GROUP_VISITOR: