Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.337.2.2
diff -u -p -r1.337.2.2 theme.inc
--- includes/theme.inc	31 May 2007 05:52:42 -0000	1.337.2.2
+++ includes/theme.inc	29 Aug 2007 11:38:59 -0000
@@ -774,8 +774,8 @@ function theme_table($header, $rows, $at
   }
 
   // Format the table rows:
-  $output .= "<tbody>\n";
   if (count($rows)) {
+    $output .= "<tbody>\n";
     $flip = array('even' => 'odd', 'odd' => 'even');
     $class = 'even';
     foreach ($rows as $number => $row) {
@@ -814,9 +814,10 @@ function theme_table($header, $rows, $at
       }
       $output .= " </tr>\n";
     }
+    $output .= '</tbody>';
   }
 
-  $output .= "</tbody></table>\n";
+  $output .= "</table>\n";
   return $output;
 }
 
