Skip to content

Commit

Permalink
fix(questionparameter): bad data for add item
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Apr 1, 2020
1 parent 5986880 commit a635e8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inc/field.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public final function updateParameters(PluginFormcreatorQuestion $question, arra
$input['_parameters'][$fieldTypeName][$fieldName]['plugin_formcreator_questions_id'] = $question->getID();
if ($parameter->isNewItem()) {
// In case of the parameter vanished in DB, just recreate it
unset($$input['_parameters'][$fieldTypeName][$fieldName]['id']);
$parameter->add($input['_parameters'][$fieldTypeName][$fieldName]);
} else {
$input['_parameters'][$fieldTypeName][$fieldName]['id'] = $parameter->getID();
Expand Down

0 comments on commit a635e8a

Please sign in to comment.