includes/template.php
changeset 484 340c81fdd350
parent 472 bc4b58034f4d
child 488 5560ff856dd7
--- a/includes/template.php	Thu Mar 06 23:04:45 2008 -0500
+++ b/includes/template.php	Thu Mar 06 23:27:50 2008 -0500
@@ -2202,10 +2202,13 @@
         $q_loc = '<a href="' . $this->tpl_strings['REPORT_URI'] . '">' . ( is_object($db) ? "{$db->num_queries} SQL" : 'Queries: N/A' ) . '</a>';
         $dbg = $t_loc;
         $dbg_long = $t_loc_long;
-        if ( $session->user_level >= USER_LEVEL_ADMIN )
+        if ( is_object($session) )
         {
-          $dbg .= "&nbsp;&nbsp;|&nbsp;&nbsp;$q_loc";
-          $dbg_long .= "&nbsp;&nbsp;|&nbsp;&nbsp;$q_loc";
+          if ( $session->user_level >= USER_LEVEL_ADMIN )
+          {
+            $dbg .= "&nbsp;&nbsp;|&nbsp;&nbsp;$q_loc";
+            $dbg_long .= "&nbsp;&nbsp;|&nbsp;&nbsp;$q_loc";
+          }
         }
         $t = str_replace('[[EnanoPoweredLink]]', 'Powered by <a href="http://enanocms.org/" onclick="window.open(this.href); return false;">Enano</a>', $t);
         $t = str_replace('[[EnanoPoweredLinkLong]]', 'Website engine powered by <a href="http://enanocms.org/" onclick="window.open(this.href); return false;">Enano</a>', $t);