cvs: php-gcov-web(SOC06) /www index.php
| From: | Nuno Lopes | Date: | Fri, 06 Oct 2006 18:14:10 +0000 |
| Subject: | cvs: php-gcov-web(SOC06) /www index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-32954@lists.php.net to get a copy of this message | ||
nlopess Fri Oct 6 18:14:10 2006 UTC
Modified files: (Branch: SOC06)
/php-gcov-web/www index.php
Log:
make it work without any data on the DB
http://cvs.php.net/viewvc.cgi/php-gcov-web/www/index.php?r1=1.1.2.10&r2=1.1.2.11&diff_format=u
Index: php-gcov-web/www/index.php
diff -u php-gcov-web/www/index.php:1.1.2.10 php-gcov-web/www/index.php:1.1.2.11
--- php-gcov-web/www/index.php:1.1.2.10 Sun Sep 10 15:28:52 2006
+++ php-gcov-web/www/index.php Fri Oct 6 18:14:10 2006
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: index.php,v 1.1.2.10 2006/09/10 15:28:52 nlopess Exp $ */
+/* $Id: index.php,v 1.1.2.11 2006/10/06 18:14:10 nlopess Exp $ */
// Include the site API
include 'site.api.php';
@@ -39,8 +39,8 @@
}
$sql = substr($sql, 0, -3);
-$stmt = $mysqlconn->prepare($sql);
-$stmt->execute();
+if ($stmt = $mysqlconn->prepare($sql))
+ $stmt->execute();
// Outputs the site header to the screen
api_showheader($appvars);
@@ -64,7 +64,7 @@
<?php
// Output PHP versions into a table
-while($row = $stmt->fetch(PDO::FETCH_NUM))
+while($stmt && $row = $stmt->fetch(PDO::FETCH_NUM))
{
list($version_name, $version_last_build_time, $version_last_attempted_build_date,
$version_last_successful_build_date) = $row;