diff --git a/core/modules/dblog/dblog.test b/core/modules/dblog/dblog.test
index e3a997e..d5efdd9 100644
--- a/core/modules/dblog/dblog.test
+++ b/core/modules/dblog/dblog.test
@@ -48,6 +48,49 @@ class DBLogTestCase extends DrupalWebTestCase {
   }
 
   /**
+   * Test improper watchdog call doesn't make the dblog unviewable
+   */
+  function testImproperWatchdogVariables() {
+    // Log in the admin user.
+    $this->drupalLogin($this->big_user);
+
+    $random_type = $this->randomString(10);
+    $random_message = $this->randomString(10);
+
+    /* Test that a bad call to watchdog doesnt insert bad data into
+       the watchdog table. */
+    watchdog($random_type, $random_message, WATCHDOG_ERROR);
+
+    // Select the inserted watchdog message back out of the database.
+    $query = db_select('watchdog', 'w')
+      ->fields('w')
+      ->condition('w.type', $random_type)
+      ->condition('w.message', $random_message);
+    $result = $query->execute()->fetch();
+    // Assert that the variables field is a serialized array.
+    $this->assertTrue(is_array(unserialize($result->variables)), t('Watchdog variables field is an array when watchdog() is used improperly'));
+
+    /* Manually insert bad data into the watchdog table and then check that
+       the dblog report will still load */
+    db_insert('watchdog')
+      ->fields(array(
+        'type' => 'test',
+        'message' => 'Test Watchdog message with bad data',
+        'variables' => serialize('this is not an array'),
+        'severity' => WATCHDOG_ERROR,
+        'location' => 'http://default/index.php',
+        'hostname' => '127.0.0.1',
+      ))
+      ->execute();
+
+    // Load the db log page and make sure there is not an error.
+    $this->drupalGet('admin/reports/dblog');
+    $this->assertResponse(200);
+    $this->assertText(t('Recent log messages'), t('admin/reports/dblog loads with bad data in watchdog table'));
+  }
+
+
+  /**
    * Verify setting of the dblog row limit.
    *
    * @param integer $count Log row limit.
