Skip to content

Commit

Permalink
fix(question,section): improve condition consistency checks
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 f9183db commit a03e3d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/conditionnable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a03e3d6

Please sign in to comment.