Skip to content

Commit 9c75f62

Browse files
committed
fix(conditionnable): consistency check for conditions
Signed-off-by: Thierry Bugier <[email protected]>
1 parent 4b0fa2d commit 9c75f62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

inc/conditionnable.class.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public function updateConditions($input) {
4646
// All arrays of condition exists
4747
if (!isset($input['plugin_formcreator_questions_id']) || !isset($input['show_condition'])
4848
|| !isset($input['show_value']) || !isset($input['show_logic'])) {
49+
$this->deleteConditions();
50+
$this->update([
51+
'id' => $this->fields['id'],
52+
'_skip_checks' => true,
53+
'show_rule' => PluginFormcreatorCondition::SHOW_RULE_ALWAYS,
54+
]);
4955
return false;
5056
}
5157

0 commit comments

Comments
 (0)