Attached Files | 0001-BUG-Fix-a-minor-PostgreSQL-incompatibility-in-test-f.patch [^] (1,478 bytes) 2013-11-01 06:22 [Show Content] [Hide Content]From da59c3c9c22af5d7ce8b1cd2829d8ab3a6e6e7f5 Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-mail@date.by>
Date: Thu, 24 Oct 2013 21:31:18 +0400
Subject: [PATCH] BUG: Fix a minor PostgreSQL incompatibility in test failure
graph viewer
This patch fixes the following error:
PHP Notice: Undefined index: count(*) in /var/www/cdash/ajax/showtestfailuregraph.php
on line 74
---
ajax/showtestfailuregraph.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ajax/showtestfailuregraph.php b/ajax/showtestfailuregraph.php
index 079a438..d541182 100644
--- a/ajax/showtestfailuregraph.php
+++ b/ajax/showtestfailuregraph.php
@@ -59,7 +59,7 @@ for($beginning_timestamp = $starttime; $beginning_timestamp>$starttime-3600*24*7
$beginning_UTCDate = gmdate(FMT_DATETIME,$beginning_timestamp);
$end_UTCDate = gmdate(FMT_DATETIME,$end_timestamp);
- $query = "SELECT min(starttime) AS starttime,count(*)
+ $query = "SELECT min(starttime) AS starttime, count(*) AS count
FROM build
JOIN build2test ON (build.id = build2test.buildid)
WHERE build.projectid = '$projectid'
@@ -71,7 +71,7 @@ for($beginning_timestamp = $starttime; $beginning_timestamp>$starttime-3600*24*7
$result = pdo_query($query);
echo pdo_error();
$result_array = pdo_fetch_array($result);
- $failures[$beginning_timestamp]=$result_array["count(*)"];
+ $failures[$beginning_timestamp]=$result_array['count'];
}
?>
--
1.7.9.5
|