Index: sites/all/modules/webform/components/grid.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/grid.inc,v
retrieving revision 1.3.2.16
diff -u -r1.3.2.16 grid.inc
--- sites/all/modules/webform/components/grid.inc	11 Jan 2009 01:40:27 -0000	1.3.2.16
+++ sites/all/modules/webform/components/grid.inc	11 Jan 2009 02:49:05 -0000
@@ -177,12 +177,12 @@
 
   if (is_array($data)) {
     foreach ($data as $key => $value) {
-      if ($value) {
+      if ($value !== '') {
         $data[$key] = $options[$value];
       }
     }
   }
-  elseif (!empty($data)) {
+  elseif ($data !== '') {
     $data = $options[$data];
   }
 
@@ -264,7 +264,7 @@
     ' FROM {webform_submitted_data} '.
     ' WHERE nid = %d '.
     ' AND cid = %d '.
-    " AND data != '0' AND data != '' ".
+    " AND data != '' ".
     ' GROUP BY no, data';
   $result = db_query($query, $component['nid'], $component['cid']);
   $counts = array();
@@ -274,7 +274,14 @@
 
   // Create an entire table to be put into the returned row.
   $rows = array();
-  $header = array('') + $options;
+  $header = array('');
+
+  // Add options as a header row.
+  foreach ($options as $option) {
+    $header[] = $option;
+  }
+
+  // Add questions as each row.
   foreach ($questions as $qkey => $question) {
     $row = array($question);
     foreach ($options as $okey => $option) {
@@ -298,13 +305,13 @@
   // Set the value as a single string.
   if (is_array($data['value'])) {
     foreach ($data['value'] as $item => $value) {
-      if ($value !== '0') {
+      if ($value !== '') {
         $output .= $questions[$item] .': '. check_plain($value) .'<br />';
       }
     }
   }
   else {
-    $output = check_plain(empty($data['value']['0']) ? '' : $data['value']['0']);
+    $output = check_plain(!isset($data['value']['0']) ? '' : $data['value']['0']);
   }
   return $output;
 }
