mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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) {
|
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…
Reference in New Issue
Block a user