Skip to content
Snippets Groups Projects
Commit aef71cb0 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

fixes #2374

Closes #2374

Merge request studip/studip!1560
parent c42ce98c
No related branches found
No related tags found
No related merge requests found
...@@ -816,15 +816,17 @@ class ResourceRequest extends SimpleORMap implements PrivacyObject, Studip\Calen ...@@ -816,15 +816,17 @@ class ResourceRequest extends SimpleORMap implements PrivacyObject, Studip\Calen
return $start_date; return $start_date;
} }
$fist_date = $this->cycle->dates->first(); if (isset($this->cycle) && count($this->cycle->dates) > 0) {
if ($this->metadate_id && isset($first_date->date)) { $first_date = $this->cycle->dates->first();
$start_date->setTimestamp($first_date->date); if ($this->metadate_id && isset($first_date->date)) {
return $start_date; $start_date->setTimestamp($first_date->date);
} return $start_date;
}
if ($this->course_id && isset($first_date->date)) { if ($this->course_id && isset($first_date->date)) {
$start_date->setTimestamp($fist_date->date); $start_date->setTimestamp($first_date->date);
return $start_date; return $start_date;
}
} }
if ($this->begin) { if ($this->begin) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment