Skip to content

Commit

Permalink
fix(question): empty name section unavailable
Browse files Browse the repository at this point in the history
should not happen, but safer
  • Loading branch information
btry committed Jan 31, 2022
1 parent d2e2b1d commit 356a4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ public function showForm($ID, $options = []) {
$section->getFromDB($this->fields['plugin_formcreator_sections_id']);
$sections = [];
foreach ((new PluginFormcreatorSection())->getSectionsFromForm($section->fields[PluginFormcreatorForm::getForeignKeyField()]) as $section) {
$sections[$section->getID()] = $section->getField('name');
$sections[$section->getID()] = $section->fields['name'] == '' ? '(' . $section->getID() . ')' : $section->fields['name'];
}
$currentSectionId = ($this->fields['plugin_formcreator_sections_id'])
? $this->fields['plugin_formcreator_sections_id']
Expand Down

0 comments on commit 356a4e1

Please sign in to comment.