Skip to content

Commit 779a5c3

Browse files
committed
fix(question): fix duplicate code
code moved in classes of the fields, useless copy not removed
1 parent e7d2b0e commit 779a5c3

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

inc/question.class.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -255,20 +255,6 @@ private function checkBeforeSave($input) {
255255
return [];
256256
}
257257

258-
// Values are required for GLPI dropdowns, dropdowns, multiple dropdowns, checkboxes, radios
259-
$itemtypes = ['select', 'multiselect', 'checkboxes', 'radios'];
260-
if (in_array($input['fieldtype'], $itemtypes)) {
261-
if (isset($input['values'])) {
262-
if (empty($input['values'])) {
263-
Session::addMessageAfterRedirect(
264-
__('The field value is required:', 'formcreator') . ' ' . $input['name'],
265-
false,
266-
ERROR);
267-
return [];
268-
}
269-
}
270-
}
271-
272258
if (!isset($input['fieldtype'])) {
273259
$input['fieldtype'] = $this->fields['fieldtype'];
274260
}

0 commit comments

Comments
 (0)