cvs: php-gcov-web(SOC06) /www viewer.php
| From: | Nuno Lopes | Date: | Fri, 06 Oct 2006 18:16:28 +0000 |
| Subject: | cvs: php-gcov-web(SOC06) /www viewer.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-32955@lists.php.net to get a copy of this message | ||
nlopess Fri Oct 6 18:16:28 2006 UTC
Modified files: (Branch: SOC06)
/php-gcov-web/www viewer.php
Log:
make it work without any data on the DB
http://cvs.php.net/viewvc.cgi/php-gcov-web/www/viewer.php?r1=1.1.2.16&r2=1.1.2.17&diff_format=u
Index: php-gcov-web/www/viewer.php
diff -u php-gcov-web/www/viewer.php:1.1.2.16 php-gcov-web/www/viewer.php:1.1.2.17
--- php-gcov-web/www/viewer.php:1.1.2.16 Mon Sep 11 15:34:18 2006
+++ php-gcov-web/www/viewer.php Fri Oct 6 18:16:28 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: viewer.php,v 1.1.2.16 2006/09/11 15:34:18 nlopess Exp $ */
+/* $Id: viewer.php,v 1.1.2.17 2006/10/06 18:16:28 nlopess Exp $ */
// Name: GCOV Viewer page
// Desc: page for view PHP version information such as code coverage
@@ -179,8 +179,8 @@
{
$stmt = null;
$sql = 'SELECT DISTINCT last_user_os FROM remote_builds';
- $stmt = $mysqlconn->prepare($sql);
- $stmt->execute();
+ if ($stmt = $mysqlconn->prepare($sql))
+ $stmt->execute();
$appvars['page']['title'] = 'PHP: Search Other Platforms';
$appvars['page']['head'] = 'Other Platform Search';
@@ -197,7 +197,7 @@
<option value="all">All Platforms</option>
HTML;
- while($row = $stmt->fetch())
+ while($stmt && $row = $stmt->fetch())
{
list($os) = $row;