Skip to content
Snippets Groups Projects
Commit 85db9be7 authored by David Siegfried's avatar David Siegfried
Browse files

prevent php8-warnings, closes #2616

Closes #2616

Merge request studip/studip!1765
parent 00cacdcd
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,7 @@ class SingleDate ...@@ -71,6 +71,7 @@ class SingleDate
function __construct($data = '') function __construct($data = '')
{ {
global $user, $id; global $user, $id;
$termin_id = '';
if ($data instanceOf CourseDate || $data instanceof CourseExDate) { if ($data instanceOf CourseDate || $data instanceof CourseExDate) {
$single_date_data = $data->toArray(); $single_date_data = $data->toArray();
$single_date_data['ex_termin'] = $data instanceOf CourseDate ? 0 : 1; $single_date_data['ex_termin'] = $data instanceOf CourseDate ? 0 : 1;
...@@ -87,7 +88,7 @@ class SingleDate ...@@ -87,7 +88,7 @@ class SingleDate
} else { } else {
$termin_id = $data; $termin_id = $data;
} }
if ($termin_id != '') { if ($termin_id !== '') {
$this->termin_id = $termin_id; $this->termin_id = $termin_id;
$this->update = true; $this->update = true;
$this->restore(); $this->restore();
...@@ -102,6 +103,10 @@ class SingleDate ...@@ -102,6 +103,10 @@ class SingleDate
} }
} }
public function __toString()
{
return $this->toString();
}
function getStartTime() function getStartTime()
{ {
...@@ -356,6 +361,7 @@ class SingleDate ...@@ -356,6 +361,7 @@ class SingleDate
function isHoliday() function isHoliday()
{ {
$name = null;
foreach (SemesterHoliday::getAll() as $val) { foreach (SemesterHoliday::getAll() as $val) {
if (($val['beginn'] <= $this->date) && ($val['ende'] >= $this->end_time)) { if (($val['beginn'] <= $this->date) && ($val['ende'] >= $this->end_time)) {
$name = $val['name']; $name = $val['name'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment