[PATCH] BUG: Initialize timestamps properly in xml upload handler

Igor Murzov e-mail at date.by
Tue Jul 30 16:51:47 UTC 2013


This commit fixes the following error:

(Build Insert): SQL error: ERROR:  invalid input syntax for type
timestamp: "" LINE 4: 'Experimental','ctest2.8.7','',
---
 xml_handlers/upload_handler.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xml_handlers/upload_handler.php b/xml_handlers/upload_handler.php
index 0d91cce..cdad317 100644
--- a/xml_handlers/upload_handler.php
+++ b/xml_handlers/upload_handler.php
@@ -111,8 +111,8 @@ class UploadHandler extends AbstractHandler
       if($buildid==0)
         {
         $this->Build->ProjectId = $this->projectid;
-        $this->Build->StartTime = $start_time;
-        $this->Build->EndTime = $start_time;
+        $this->Build->StartTime = gmdate(FMT_DATETIME);
+        $this->Build->EndTime = gmdate(FMT_DATETIME);
         $this->Build->SubmitTime = gmdate(FMT_DATETIME);
         $this->Build->SetSubProject($this->SubProjectName);
         $this->Build->Append = $this->Append;
-- 
1.7.9.5


--MP_/8WMNHp=4VLYJ+F+9MyaN7JD--


More information about the CDash mailing list