From a03e3d64e604ec86a2810cc00ff0394535f45602 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 19 May 2020 14:41:47 +0200 Subject: [PATCH] fix(question,section): improve condition consistency checks Signed-off-by: Thierry Bugier --- inc/conditionnable.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/conditionnable.class.php b/inc/conditionnable.class.php index f0645169c..78ff73541 100644 --- a/inc/conditionnable.class.php +++ b/inc/conditionnable.class.php @@ -51,6 +51,10 @@ public function updateConditions($input) { if (!is_array($input['plugin_formcreator_questions_id']) || !is_array($input['show_condition']) || !is_array($input['show_value']) || !is_array($input['show_logic'])) { + $this->deleteConditions(); + $input['show_rule'] = PluginFormcreatorCondition::SHOW_RULE_ALWAYS; + $input['_skip_checks'] = true; + $this->update(['id' => $this->fields['id']] + $input); return false; }