aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2022-01-14 13:59:11 +0100
committerThomas Hackl <hackl@data-quest.de>2022-01-14 13:59:11 +0100
commitc2b09a90fb258e3f2aa4135396590d0628bb2140 (patch)
treeab16e91cd31ddadc94a3cfd2d918458d5670582e /lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php
parent45510fb9f2cf3553dcd314db3785c78e4a608b1d (diff)
check if the I18NString is an object or just a string (happens when only one content language is defined), re #154
Diffstat (limited to 'lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php')
-rw-r--r--lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php b/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php
index 1843084..595c5fe 100644
--- a/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php
+++ b/lib/classes/coursewizardsteps/AdvancedBasicDataWizardStep.php
@@ -132,9 +132,9 @@ class AdvancedBasicDataWizardStep extends BasicDataWizardStep
$values[__CLASS__] = array_merge($values[__CLASS__], [
'subtitle' => $course->untertitel,
- 'subtitle_i18n' => $course->untertitel->toArray(),
+ 'subtitle_i18n' => is_object($course->untertitel) ? $course->untertitel->toArray() : $course->untertitel,
'kind' => $course->art,
- 'kind_i18n' => $course->art->toArray(),
+ 'kind_i18n' => is_object($course->art) ? $course->art->toArray() : $course->art,
'ects' => $course->ects,
'maxmembers' => $course->admission_turnout,
]);