diff --git a/rich_snippets.preprocess.inc b/rich_snippets.preprocess.inc index ad8d3c6311da113b446192f438c2e02e9659fa33..fb352b42a05a4f33a39955e9d1d99c6fc9de354d 100644 --- a/rich_snippets.preprocess.inc +++ b/rich_snippets.preprocess.inc @@ -12,7 +12,10 @@ * An associative array of template variables. */ function rich_snippets_default_preprocessor(&$variables) { - + // Rich snippets should not go any further if the result doesn't contain a node object + if (!isset($variables['result']['node'])) { + return; + } // Build the date, remove it from search info. $date = theme('rich_snippets_date', array('date' => $variables['result']['date'])); $variables['snippet'] = $date . ' ' . $variables['snippet'];