diff --git a/modules/search/search.pages.inc b/modules/search/search.pages.inc
index 833ea8b..88b6139 100644
--- a/modules/search/search.pages.inc
+++ b/modules/search/search.pages.inc
@@ -118,10 +118,10 @@ function template_preprocess_search_result(&$variables) {
   if (!empty($result['module'])) {
     $info['module'] = check_plain($result['module']);
   }
-  if (!empty($result['user'])) {
+  if (!empty($result['user']) && !empty($result['node']) && variable_get('node_submitted_' . $result['node']->type, TRUE)) {
     $info['user'] = $result['user'];
   }
-  if (!empty($result['date'])) {
+  if (!empty($result['date']) && !empty($result['node']) && variable_get('node_submitted_' . $result['node']->type, TRUE)) {
     $info['date'] = format_date($result['date'], 'short');
   }
   if (isset($result['extra']) && is_array($result['extra'])) {
diff --git a/modules/search/search.test b/modules/search/search.test
index a6ed0df..d50cab0 100644
--- a/modules/search/search.test
+++ b/modules/search/search.test
@@ -353,6 +353,19 @@ class SearchAdvancedSearchForm extends DrupalWebTestCase {
 
     $this->drupalPost('search/node', array_merge($edit, array('type[article]' => 'article')), t('Advanced search'));
     $this->assertText('bike shed', t('Article node is not found with POST query and type:article.'));
+
+    // Check that with post settings turned on the post information is displayed.
+    variable_set('node_submitted_' . $this->node->type, TRUE);
+    $this->drupalGet('search/node/' . $this->node->title);
+    $user = user_load($this->node->uid);
+    $this->assertText($user->name, 'Basic page node displays author name when post settings are on.');
+    $this->assertText(format_date($this->node->changed, 'short'), 'Basic page node displays post date when post settings are on.');
+
+    // Check that with post settings turned off the post information is not displayed.
+    variable_set('node_submitted_' . $this->node->type, FALSE);
+    $this->drupalGet('search/node/' . $this->node->title);
+    $this->assertNoText($user->name, 'Basic page node does not display author name when post settings are off.');
+    $this->assertNoText(format_date($this->node->changed, 'short'), 'Basic page node does not display post date when post settings are off.');
   }
 }
 
