BUGFIX Make sure a message is set on ValidationException objects.

This commit is contained in:
Simon Elvery 2012-12-05 12:16:25 +10:00
parent ab260d4913
commit 205ee42110

View File

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