From d13f3592ace2e4b3bd4052d7f2f935db1372143d Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Thu, 12 Nov 2009 09:09:54 +0000 Subject: [PATCH] * fix the bug of judge empty date. --- trunk/module/bug/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/module/bug/model.php b/trunk/module/bug/model.php index ae6269d25b..d9bb69b347 100644 --- a/trunk/module/bug/model.php +++ b/trunk/module/bug/model.php @@ -59,7 +59,7 @@ class bugModel extends model ->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') ->leftJoin(TABLE_TASK)->alias('t4')->on('t1.task = t4.id') ->where('t1.id')->eq((int)$bugID)->fetch(); - foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !strtotime($value)) $bug->$key = ''; + foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = ''; $bug->mailto = ltrim(trim($bug->mailto), ','); if($bug->duplicateBug) $bug->duplicateBugTitle = $this->dao->findById($bug->duplicateBug)->from(TABLE_BUG)->fields('title')->fetch('title'); return $bug;