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