Index: apachesolr_mlt.module
===================================================================
--- apachesolr_mlt.module	(revision 247)
+++ apachesolr_mlt.module	(working copy)
@@ -81,19 +81,14 @@
       
       $r =  (array) end($response->moreLikeThis);
       //TODO: Figure out why this works
-      $links = array();
       
-      if (is_array($r['docs'])) {
-        foreach ($r['docs'] as $doc) {
-          $links[] = l($doc->title, 'node/' . $doc->nid);
-        }
+      $suggestions = array();
+
+      if (is_array($r['docs']) && count($r['docs']) > 0) {
+        $suggestions['subject'] = $block['name'];
+        $suggestions['content'] = theme('apachesolr_mlt_recommendation_block', $r['docs']);
        }
 
-      $suggestions = array();
-      if (count($links) > 0) {
-        $suggestions['subject'] = $block['name'];
-        $suggestions['content'] = theme('apachesolr_mlt_recommendation_block', $links);
-      }
       return $suggestions;
     } catch ( Exception $e ) {
         watchdog ( 'Apache Solr', $e->getMessage (), WATCHDOG_ERROR );
@@ -101,7 +96,13 @@
   }
 }
 
-function theme_apachesolr_mlt_recommendation_block($links) {
+function theme_apachesolr_mlt_recommendation_block($docs) {
+  $links = array();
+
+  foreach ($docs as $doc) {
+    $links[] = l($doc->title, 'node/' . $doc->nid);
+  }
+
   return theme('item_list', $links);
 }
 
