Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUG Regression in Form->clearMessage() (fixes #8186)

  • Loading branch information...
commit 014f541a89060f125a4ad8731d116c91766c0e4d 1 parent 64d3a3d
@chillu chillu authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 forms/Form.php
View
12 forms/Form.php
@@ -1319,17 +1319,15 @@ public function callfieldmethod($data) {
* than <% control FormObject %>
*/
public function forTemplate() {
- return $this->renderWith(array_merge(
- (array)$this->getTemplate(),
- array('Form')
- ));
-
// Now that we're rendered, clear message
Session::clear("FormInfo.{$this->FormName()}.errors");
Session::clear("FormInfo.{$this->FormName()}.formError");
Session::clear("FormInfo.{$this->FormName()}.data");
-
- return $result;
+
+ return $this->renderWith(array_merge(
+ (array)$this->getTemplate(),
+ array('Form')
+ ));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.