diff --git a/includes/theme.inc b/includes/theme.inc
index ee73965..55e0f0a 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2504,9 +2504,10 @@ function template_preprocess_html(&$variables) {
   }
 
   // Construct page title.
-  if (drupal_get_title()) {
+  $title = drupal_get_title();
+  if (isset($title)) {
     $head_title = array(
-      'title' => strip_tags(drupal_get_title()),
+      'title' => strip_tags($title),
       'name' => check_plain(variable_get('site_name', 'Drupal')),
     );
   }
diff --git a/modules/node/node.test b/modules/node/node.test
index 0777e11..bdebdd7 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -1873,6 +1873,16 @@ class NodeTitleTestCase extends DrupalWebTestCase {
     // Test node title is clickable on teaser list (/node).
     $this->drupalGet('node');
     $this->clickLink($node->title);
+
+    // Test edge case where node title is set to 0.
+    $settings = array(
+      'title' => 0,
+    );
+    $node = $this->drupalCreateNode($settings);
+    $this->drupalGet('node/' . $node->nid);
+    $this->assertTitle(0 . ' | Drupal', 'Page title is equal to 0.', 'Node');
+    // Test that 0 appears in the template <h1>.
+    $this->assertEqual(current($this->xpath('//h1')), 0, 'Node title is displayed as 0.', 'Node');
   }
 }
 
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php
index bd61489..36a9d67 100644
--- a/modules/system/page.tpl.php
+++ b/modules/system/page.tpl.php
@@ -126,7 +126,7 @@
         <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
         <a id="main-content"></a>
         <?php print render($title_prefix); ?>
-        <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+        <?php if (isset($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
         <?php print render($title_suffix); ?>
         <?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
         <?php print render($page['help']); ?>
diff --git a/themes/bartik/templates/page.tpl.php b/themes/bartik/templates/page.tpl.php
index 62f58d7..445e68e 100644
--- a/themes/bartik/templates/page.tpl.php
+++ b/themes/bartik/templates/page.tpl.php
@@ -187,7 +187,7 @@
       <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
       <a id="main-content"></a>
       <?php print render($title_prefix); ?>
-      <?php if ($title): ?>
+      <?php if (isset($title)): ?>
         <h1 class="title" id="page-title">
           <?php print $title; ?>
         </h1>
diff --git a/themes/garland/page.tpl.php b/themes/garland/page.tpl.php
index 326255c..937aa08 100644
--- a/themes/garland/page.tpl.php
+++ b/themes/garland/page.tpl.php
@@ -42,7 +42,7 @@
           <a id="main-content"></a>
           <?php if ($tabs): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?>
           <?php print render($title_prefix); ?>
-          <?php if ($title): ?>
+          <?php if (isset($title)): ?>
             <h1<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h1>
           <?php endif; ?>
           <?php print render($title_suffix); ?>
diff --git a/themes/seven/page.tpl.php b/themes/seven/page.tpl.php
index 6ab3ae8..32de3fb 100644
--- a/themes/seven/page.tpl.php
+++ b/themes/seven/page.tpl.php
@@ -2,7 +2,7 @@
   <div id="branding" class="clearfix">
     <?php print $breadcrumb; ?>
     <?php print render($title_prefix); ?>
-    <?php if ($title): ?>
+    <?php if (isset($title)): ?>
       <h1 class="page-title"><?php print $title; ?></h1>
     <?php endif; ?>
     <?php print render($title_suffix); ?>
