Attached Files | 0001-BUG-Properly-fetch-result-of-SQL-query-on-coverage-i.patch [^] (1,073 bytes) 2013-08-26 09:46 [Show Content] [Hide Content]From a3a6bb6d47a7bd3dc0b10e69f7ca24432fb0a4b7 Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-mail@date.by>
Date: Tue, 20 Aug 2013 14:25:22 +0400
Subject: [PATCH] BUG: Properly fetch result of SQL query on coverage info removal
This commit fixes the following error:
PHP Fatal error: Cannot use object of type PDOStatement as array
in /var/www/cdash/models/coveragesummary.php on line 63
---
models/coveragesummary.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/models/coveragesummary.php b/models/coveragesummary.php
index fc13f9e..680002e 100644
--- a/models/coveragesummary.php
+++ b/models/coveragesummary.php
@@ -60,7 +60,8 @@ class CoverageSummary
$fileid = $coverage_array["fileid"];
// Make sur the file is not shared
$numfiles = pdo_query("SELECT count(*) FROM coveragefile WHERE id='$fileid'");
- if($numfiles[0]==1)
+ $numfiles_array = pdo_fetch_row($numfiles);
+ if($numfiles_array[0]==1)
{
pdo_query("DELETE FROM coveragefile WHERE id='$fileid'");
}
--
1.7.9.5
|