Browse Source

Fixes issue #481.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
8157ea5804
  1. 2
      framework/yii/validators/DateValidator.php

2
framework/yii/validators/DateValidator.php

@ -58,7 +58,7 @@ class DateValidator extends Validator
$date = DateTime::createFromFormat($this->format, $value);
if ($date === false) {
$this->addError($object, $attribute, $this->message);
} elseif ($this->timestampAttribute !== false) {
} elseif ($this->timestampAttribute !== null) {
$object->{$this->timestampAttribute} = $date->getTimestamp();
}
}

Loading…
Cancel
Save