|
From: Benjamin C. <bc...@us...> - 2002-05-05 16:33:15
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16628
Modified Files:
index.php
Log Message:
Fixes bug #542242 - Fail nicely with no bugs in db and jpgraph enabled
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- index.php 8 Apr 2002 12:54:25 -0000 1.30
+++ index.php 5 May 2002 16:33:12 -0000 1.31
@@ -43,6 +43,8 @@
}
function build_image($restricted_projects) {
+ global $STRING;
+
error_reporting(0); // Force this, just in case
include_once JPGRAPH_PATH.'jpgraph.php';
include_once JPGRAPH_PATH.'jpgraph_pie.php';
@@ -57,6 +59,10 @@
$alts[] = $stat['name'];
$totalbugs += $stat['count'];
}
+ }
+
+ if (!$totalbugs) {
+ return $STRING['nobugs'];
}
// Create the Pie Graph.
|