Skip to content
Snippets Groups Projects
Commit fde40a59 authored by André Noack's avatar André Noack Committed by David Siegfried
Browse files

Resolve "PHP8 Warning bei Export von Ablaufplan"

Closes #4399

Merge request studip/studip!3213
parent f84b6123
No related branches found
No related tags found
No related merge requests found
...@@ -19,18 +19,21 @@ ...@@ -19,18 +19,21 @@
<? <?
$all_semester = Semester::findAllVisible(false); $all_semester = Semester::findAllVisible(false);
$grenze = 0;
foreach ($dates as $date) : foreach ($dates as $date) :
if ( ($grenze == 0) || ($grenze < $date['start']) ) { if ( ($grenze == 0) || ($grenze < $date['start']) ) {
foreach ($all_semester as $zwsem) { foreach ($all_semester as $zwsem) {
if ( ($zwsem['beginn'] < $date['start']) && ($zwsem['ende'] > $date['start']) ) { if (!empty($zwsem['beginn'])) {
$grenze = $zwsem['ende']; if ( ($zwsem['beginn'] < $date['start']) && ($zwsem['ende'] > $date['start']) ) {
?> $grenze = $zwsem['ende'];
<tr> ?>
<td colspan="5"> <tr>
<h3><?= htmlReady($zwsem['name']) ?></h3> <td colspan="5">
</td> <h3><?= htmlReady($zwsem['name']) ?></h3>
</tr> </td>
<? </tr>
<?
}
} }
} }
} }
......
...@@ -62,10 +62,10 @@ class Issue { ...@@ -62,10 +62,10 @@ class Issue {
function __construct($data = []) { function __construct($data = []) {
global $user; global $user;
if ($data['issue_id']) { if (!empty($data['issue_id'])) {
$this->issue_id = $data['issue_id']; $this->issue_id = $data['issue_id'];
$this->restore(); $this->restore();
} else if ($data['seminar_id']) { } else if (!empty($data['seminar_id'])) {
$this->issue_id = md5(uniqid('Issue')); $this->issue_id = md5(uniqid('Issue'));
$this->seminar_id = $data['seminar_id']; $this->seminar_id = $data['seminar_id'];
$this->mkdate = time(); $this->mkdate = time();
...@@ -190,7 +190,7 @@ class Issue { ...@@ -190,7 +190,7 @@ class Issue {
$this->mkdate = $data['mkdate']; $this->mkdate = $data['mkdate'];
$this->chdate = $data['chdate']; $this->chdate = $data['chdate'];
$this->priority = $data['priority']; $this->priority = $data['priority'];
$this->file = ($data['range_id'] == '') ? FALSE : TRUE; $this->file = !empty($data['range_id']);
if ($this->file) { if ($this->file) {
$this->folder_id = $data['folder_id']; $this->folder_id = $data['folder_id'];
} }
......
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