mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Make sure a message is set on ValidationException objects.
This commit is contained in:
parent
ab260d4913
commit
205ee42110
@ -17,6 +17,7 @@ class ValidationException extends Exception {
|
|||||||
public function __construct($result = null, $message = null, $code = 0) {
|
public function __construct($result = null, $message = null, $code = 0) {
|
||||||
if($result instanceof ValidationResult) {
|
if($result instanceof ValidationResult) {
|
||||||
$this->result = $result;
|
$this->result = $result;
|
||||||
|
$message = $result->message();
|
||||||
} else {
|
} else {
|
||||||
$code = $message;
|
$code = $message;
|
||||||
$message = $result;
|
$message = $result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user