Skip to content

Commit ba2e9dd

Browse files
committed
fix(questionparameter): duplicate with GLPI 9.5
GLPI introduced clone feature when adding an item with an ID as input parameter Signed-off-by: Thierry Bugier <[email protected]>
1 parent dad1cfd commit ba2e9dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

inc/question.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ public function updateParameters($input) {
624624
foreach ($input['_parameters'][$this->fields['fieldtype']] as $fieldName => $parameterInput) {
625625
$parameterInput['plugin_formcreator_questions_id'] = $this->getID();
626626
if ($parameters[$fieldName]->isNewItem()) {
627+
unset($parameterInput['id']);
627628
$parameters[$fieldName]->add($parameterInput);
628629
} else {
629630
$parameterInput['id'] = $parameters[$fieldName]->getID();

0 commit comments

Comments
 (0)