CC-3639: Preferences-> Fade In is interpreted improperly (it is insanely high)
- the regular exp check in model class was wrong
This commit is contained in:
parent
ef908ee894
commit
1bb04296a9
4 changed files with 6 additions and 7 deletions
|
@ -110,7 +110,7 @@ class CcSchedule extends BaseCcSchedule {
|
|||
if ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
}
|
||||
else if (preg_match('/^[0-5][0-9](\.\d{1,6})?$/', $v)) {
|
||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||
$dt = DateTime::createFromFormat("s.u", $v);
|
||||
}
|
||||
else {
|
||||
|
@ -120,7 +120,6 @@ class CcSchedule extends BaseCcSchedule {
|
|||
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
||||
}
|
||||
}
|
||||
|
||||
$this->fade_in = $dt->format('H:i:s.u');
|
||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
||||
|
||||
|
@ -138,7 +137,7 @@ class CcSchedule extends BaseCcSchedule {
|
|||
if ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
}
|
||||
else if (preg_match('/^[0-5][0-9](\.\d{1,6})?$/', $v)) {
|
||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||
$dt = DateTime::createFromFormat("s.u", $v);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue