BUGFIX Case insensitive DateField value navigation (fixes #5990, thanks gw0( (from r110838)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112851 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-19 01:40:21 +00:00
parent 3c6512ab1a
commit 2c60a67e09

View File

@ -140,6 +140,9 @@ class DateField extends TextField {
$this->value = null;
$this->valueObj = null;
} else {
// Quick fix for overzealous Zend validation, its case sensitive on month names (see #5990)
if(is_string($val)) $val = ucwords(strtolower($val));
if($this->getConfig('dmyfields')) {
// Setting in correct locale
if(is_array($val) && $this->validateArrayValue($val)) {