mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Better error message on bad Enum default (from r97979)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102560 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
99df0fbbeb
commit
9e9dcb1b96
@ -30,7 +30,7 @@ class Enum extends DBField {
|
|||||||
if(in_array($default, $enum)) {
|
if(in_array($default, $enum)) {
|
||||||
$this->default = $default;
|
$this->default = $default;
|
||||||
} else {
|
} else {
|
||||||
user_error("Enum::__construct() The default value does not match any item in the enumeration", E_USER_ERROR);
|
user_error("Enum::__construct() The default value '$default' does not match any item in the enumeration", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// By default, set the default value to the first item
|
// By default, set the default value to the first item
|
||||||
|
Loading…
Reference in New Issue
Block a user