diff --git a/inc/form.class.php b/inc/form.class.php index 0750d6eec..ef1bfafc0 100644 --- a/inc/form.class.php +++ b/inc/form.class.php @@ -1896,7 +1896,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con global $DB; if (!isset($input['uuid']) && !isset($input['id'])) { - throw new ImportFailureException(''); + throw new ImportFailureException('UUID or ID is mandatory'); } $formFk = PluginFormcreatorForm::getForeignKeyField(); diff --git a/inc/question.class.php b/inc/question.class.php index dd8c2590e..90a125d1e 100644 --- a/inc/question.class.php +++ b/inc/question.class.php @@ -918,9 +918,6 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con if (isset($input['_parameters'])) { $parameters = $field->getParameters(); foreach ($parameters as $fieldName => $parameter) { - if (false === ($input['_parameters'][$input['fieldtype']][$fieldName])) { - continue; - } $parameter::import($linker, $input['_parameters'][$input['fieldtype']][$fieldName], $itemId); } } diff --git a/inc/questionregex.class.php b/inc/questionregex.class.php index 52447d867..49a46ecb5 100644 --- a/inc/questionregex.class.php +++ b/inc/questionregex.class.php @@ -120,7 +120,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con global $DB; if (!isset($input['uuid']) && !isset($input['id'])) { - throw new ImportFailureException(''); + throw new ImportFailureException('UUID or ID is mandatory'); } $questionFk = PluginFormcreatorQuestion::getForeignKeyField();