From 53d25e9275bc6884a31865d022e6067dcb74c645 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 14 Aug 2013 17:12:05 -0400 Subject: [PATCH] Fixes #763. --- framework/yii/base/Formatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/base/Formatter.php b/framework/yii/base/Formatter.php index b2694ea..50b656a 100644 --- a/framework/yii/base/Formatter.php +++ b/framework/yii/base/Formatter.php @@ -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 {