Skip to content

Commit

Permalink
fix(formanswer): possible loop bug
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Aug 10, 2020
1 parent 4c4d97e commit 25d1abf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,12 @@ public function post_addItem() {

// TODO: find a way to validate the answers
// It the form is not being validated, nothing gives the power to anyone to validate the answers
$this->update([
$formAnswer = new self();
$formAnswer->update([
'id' => $this->getID(),
'status' => self::STATUS_WAITING,
]);
return;
}
}
$this->createIssue();
Expand All @@ -1186,10 +1188,12 @@ public function post_updateItem($history = 1) {

// TODO: find a way to validate the answers
// It the form is not being validated, nothing gives the power to anyone to validate the answers
$this->update([
$formAnswer = new self();
$formAnswer->update([
'id' => $this->getID(),
'status' => self::STATUS_WAITING,
]);
return;
}
}
$this->updateIssue();
Expand Down

0 comments on commit 25d1abf

Please sign in to comment.