Exercise: Fix error when object link is null - refs BT#21109

pull/4928/head
christian 1 year ago
parent 774dc1e2be
commit d1b862c95d
  1. 2
      public/main/exercise/exercise.class.php

@ -6537,7 +6537,7 @@ class Exercise
$course = api_get_course_entity($this->course_id);
$link = $exercise->getFirstResourceLinkFromCourseSession($course);
if ($link->isDraft()) {
if ($link && $link->isDraft()) {
$this->active = 0;
}

Loading…
Cancel
Save