diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2024-11-05 14:48:18 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-11-05 14:48:18 +0000 |
| commit | 5e152fa4fb034e5952dfde30e7f2cd99a6e33b39 (patch) | |
| tree | b086796c5c106d20899f4c3ba508d2fcc2b6bd0f /public | |
| parent | d5327a04059ae4b88a51f0c089370d597717f4e3 (diff) | |
prevent php-warnings, fixes #4829
Merge request studip/studip!3611
Diffstat (limited to 'public')
| -rw-r--r-- | public/eval_summary_export.php | 7 | ||||
| -rw-r--r-- | public/show_bereich.php | 2 | ||||
| -rw-r--r-- | public/show_evaluation.php | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/public/eval_summary_export.php b/public/eval_summary_export.php index 77b349a..118cd92 100644 --- a/public/eval_summary_export.php +++ b/public/eval_summary_export.php @@ -138,7 +138,10 @@ function do_graph($data, $evalquestion_id) ); if(!empty($data)) { - $max_x = max(array_map('next',$data)); + array_walk($data, function($d) use (&$_data) { + $_data[] = next($d); + }); + $max_x = max($_data); $graph->SetPlotAreaWorld(NULL, 0); // y-achse bei 0 starten $graph->SetPrecisionY(0); //anzahl kommastellen y-achse $graph->SetYTickIncrement($max_x < 10 ? 1 : round($max_x/10)); @@ -169,7 +172,7 @@ function freetype_answers ($parent_id, $anz_nutzer) { ORDER BY position"; $statement = DBManager::get()->prepare($query); $statement->execute([$parent_id]); - + $counter = 0; while ($answer = $statement->fetchColumn()) { $counter++; fputs($fo_file," <fo:table-row>\n"); diff --git a/public/show_bereich.php b/public/show_bereich.php index 2a5e55d..94bda5e 100644 --- a/public/show_bereich.php +++ b/public/show_bereich.php @@ -47,7 +47,7 @@ if (Request::option('select_sem')) { $_SESSION['_default_sem'] = Request::option('select_sem'); } -$show_semester = Request::option('select_sem', $_SESSION['_default_sem']); +$show_semester = Request::option('select_sem', $_SESSION['_default_sem'] ?? ''); $sem_browse_obj = new SemBrowse(['group_by' => 0]); $sem_browse_obj->sem_browse_data['default_sem'] = "all"; $sem_browse_obj->sem_number = false; diff --git a/public/show_evaluation.php b/public/show_evaluation.php index e81510a..76f6c1f 100644 --- a/public/show_evaluation.php +++ b/public/show_evaluation.php @@ -240,7 +240,7 @@ page_close(); ( is_array($answers) && ! in_array($item->getObjectID(), array_keys($answers)) ) ) && - trim($freetexts[$item->getObjectID()]) == '' + empty($freetexts[$item->getObjectID()]) ) { $mandatories[] = $item->getObjectID(); |
