FIX: getMessageFromSession returning null on first access

This commit is contained in:
Will Rossiter 2014-02-28 21:24:09 +13:00
parent 8ab0fd879d
commit c74137e679

View File

@ -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;
} }
} }