Skip to content

Commit 356a4e1

Browse files
committed
fix(question): empty name section unavailable
should not happen, but safer
1 parent d2e2b1d commit 356a4e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/question.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ public function showForm($ID, $options = []) {
809809
$section->getFromDB($this->fields['plugin_formcreator_sections_id']);
810810
$sections = [];
811811
foreach ((new PluginFormcreatorSection())->getSectionsFromForm($section->fields[PluginFormcreatorForm::getForeignKeyField()]) as $section) {
812-
$sections[$section->getID()] = $section->getField('name');
812+
$sections[$section->getID()] = $section->fields['name'] == '' ? '(' . $section->getID() . ')' : $section->fields['name'];
813813
}
814814
$currentSectionId = ($this->fields['plugin_formcreator_sections_id'])
815815
? $this->fields['plugin_formcreator_sections_id']

0 commit comments

Comments
 (0)