BUG-14980 Validacion Date en Pmtables no es respetada SOLVED
- The om propel class generates a validation for null values if for the fields date/time. - A validation was added in the om propel class for null values if in the pmtable it's defined.
This commit is contained in:
@@ -588,7 +588,15 @@ abstract class ".$this->getClassname()." extends ".ClassTools::classname($this->
|
||||
|
||||
$script .= "
|
||||
if (\$v !== null && !is_int(\$v)) {
|
||||
\$ts = strtotime(\$v);
|
||||
\$ts = strtotime(\$v);";
|
||||
if ($col->getPhpDefaultValue() != 1) {
|
||||
$script .= "
|
||||
//Date/time accepts null values
|
||||
if (\$v == '') {
|
||||
\$ts = null;
|
||||
}";
|
||||
}
|
||||
$script .="
|
||||
if (\$ts === -1 || \$ts === false) {
|
||||
throw new PropelException(\"Unable to parse date/time value for [$clo] from input: \" .
|
||||
var_export(\$v, true));
|
||||
|
||||
Reference in New Issue
Block a user