diff --git a/includes/form.inc b/includes/form.inc
index 40363d6..2c1aad4 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -3948,7 +3948,7 @@ function theme_form_element_label($variables) {
   $t = get_t();
 
   // If title and required marker are both empty, output no label.
-  if (empty($element['#title']) && empty($element['#required'])) {
+  if (empty($element['#title']) && ($element['#title'] != 0) && empty($element['#required'])) {
     return '';
   }
 
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 71187b5..b1e5bf3 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -612,6 +612,10 @@ class FormsElementsLabelsTestCase extends DrupalWebTestCase {
     $elements = $this->xpath('//input[@id="edit-form-checkboxes-test-third-checkbox"]/following-sibling::label[@for="edit-form-checkboxes-test-third-checkbox" and @class="option"]');
     $this->assertTrue(isset($elements[0]), t("Label follows field and label option class correct for regular checkboxes."));
 
+    // Make sure the label is rendered
+    $elements = $this->xpath('//input[@id="edit-form-checkboxes-test-0"]/following-sibling::label[@for="edit-form-checkboxes-test-0" and @class="option"]');
+    $this->assertTrue(isset($elements[0]), t("Label 0 found."));
+
     $elements = $this->xpath('//input[@id="edit-form-radios-test-second-radio"]/following-sibling::label[@for="edit-form-radios-test-second-radio" and @class="option"]');
     $this->assertTrue(isset($elements[0]), t("Label follows field and label option class correct for regular radios."));
 
diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module
index a934816..7ac014b 100644
--- a/modules/simpletest/tests/form_test.module
+++ b/modules/simpletest/tests/form_test.module
@@ -694,6 +694,7 @@ function form_label_test_form() {
       'first-checkbox' => t('First checkbox'),
       'second-checkbox' => t('Second checkbox'),
       'third-checkbox' => t('Third checkbox'),
+      '0' => t('0 checkbox'),
     ),
   );
   $form['form_radios_test'] = array(
@@ -703,6 +704,7 @@ function form_label_test_form() {
       'first-radio' => t('First radio'),
       'second-radio' => t('Second radio'),
       'third-radio' => t('Third radio'),
+      '0' => t('0 checkbox'),
     ),
     // Test #field_prefix and #field_suffix placement.
     '#field_prefix' => '<span id="form-test-radios-field-prefix">' . t('Radios #field_prefix element') . '</span>',
