Skip to content

Commit

Permalink
fix(conditionnable): consistency check for conditions
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed May 19, 2020
1 parent 4b0fa2d commit 9c75f62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/conditionnable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ public function updateConditions($input) {
// All arrays of condition exists
if (!isset($input['plugin_formcreator_questions_id']) || !isset($input['show_condition'])
|| !isset($input['show_value']) || !isset($input['show_logic'])) {
$this->deleteConditions();
$this->update([
'id' => $this->fields['id'],
'_skip_checks' => true,
'show_rule' => PluginFormcreatorCondition::SHOW_RULE_ALWAYS,
]);
return false;
}

Expand Down

0 comments on commit 9c75f62

Please sign in to comment.