mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX: getMessageFromSession returning null on first access
This commit is contained in:
parent
8ab0fd879d
commit
c74137e679
@ -1016,12 +1016,17 @@ class Form extends RequestHandler {
|
|||||||
return $this->messageType;
|
return $this->messageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function getMessageFromSession() {
|
protected function getMessageFromSession() {
|
||||||
if($this->message || $this->messageType) {
|
if($this->message || $this->messageType) {
|
||||||
return $this->message;
|
return $this->message;
|
||||||
} else {
|
} else {
|
||||||
$this->message = Session::get("FormInfo.{$this->FormName()}.formError.message");
|
$this->message = Session::get("FormInfo.{$this->FormName()}.formError.message");
|
||||||
$this->messageType = Session::get("FormInfo.{$this->FormName()}.formError.type");
|
$this->messageType = Session::get("FormInfo.{$this->FormName()}.formError.type");
|
||||||
|
|
||||||
|
return $this->message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user