Commit 53d25e92 by Qiang Xue

Fixes #763.

parent 6e32fae3
......@@ -314,7 +314,7 @@ class Formatter extends Component
protected function normalizeDatetimeValue($value)
{
if (is_string($value)) {
return is_numeric($value) ? (int)$value : strtotime($value);
return is_numeric($value) || $value === '' ? (int)$value : strtotime($value);
} elseif ($value instanceof DateTime) {
return $value->getTimestamp();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment