diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-07-06 13:25:06 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-07-06 13:25:06 +0000 |
| commit | 89512696839235e4b3d2ca135917ae038ff5fc3c (patch) | |
| tree | e7870c1f8313dc39836745408dbb7a01f73a9b4e /lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php | |
| parent | a5813cb77af590aaf2c49aea66f9d33d47b066f6 (diff) | |
fixes 'Method/function should return XY but return statement is missing', fixes #1278
Closes #1278
Merge request studip/studip!783
Diffstat (limited to 'lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php')
| -rw-r--r-- | lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php b/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php index 595c5fe..780f837 100644 --- a/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php +++ b/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php @@ -39,13 +39,16 @@ class AdvancedBasicDataWizardStep extends BasicDataWizardStep $factory = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'].'/app/views/course/wizard/steps'); $template = $factory->open('advancedbasicdata/index'); - if ($template = $this->setupTemplateAttributes($template, $values, $stepnumber, $temp_id)) { - $values = $this->makeI18N($values[__CLASS__], ['name', 'description', 'subtitle', 'kind']); + $template = $this->setupTemplateAttributes($template, $values, $stepnumber, $temp_id); + if (!$template) { + return ''; + } - $template->set_attribute('values', array_merge($template->values, $values)); + $values = $this->makeI18N($values[__CLASS__], ['name', 'description', 'subtitle', 'kind']); - return $template->render(); - } + $template->set_attribute('values', array_merge($template->values, $values)); + + return $template->render(); } /** |
