includes/template.php
changeset 98 6457a9b983c6
parent 91 8079b0288e8e
child 102 d807dcd7aed7
--- a/includes/template.php	Sun Aug 19 16:22:04 2007 -0400
+++ b/includes/template.php	Sat Aug 25 12:11:31 2007 -0400
@@ -1682,7 +1682,14 @@
       $dbg = 'Time: '.$f.'s  |  Queries: '.$nq;
       $t = $this->process_template('footer.tpl');
       $t = str_replace('[[Stats]]', $dbg, $t);
-      $t = str_replace('[[NumQueries]]', (string)$db->num_queries, $t);
+      if ( is_object($db) )
+      {
+        $t = str_replace('[[NumQueries]]', (string)$db->num_queries, $t);
+      }
+      else
+      {
+        $t = str_replace('[[NumQueries]]', '0', $t);
+      }
       $t = str_replace('[[GenTime]]', (string)$f, $t);
       
       echo $t;