--- flickr.module.old	Sat Aug  5 04:03:12 2006
+++ flickr.module	Fri Sep 15 03:38:57 2006
@@ -103,8 +103,13 @@
       } 
     else {
       $i = 0;
-      foreach ($settree['rsp']['photosets'] as $album_id => $album_details) {
-        $output .= theme('flickr_photoset', $album_details, $album_id, "_t");
+      if (empty($settree['rsp']['photosets'])) {
+	$output .= "no photosets found.<br />";
+      }
+      else {
+	foreach ($settree['rsp']['photosets'] as $album_id => $album_details) {
+          $output .= theme('flickr_photoset', $album_details, $album_id, "_t");
+        }
       }
     }
     $output .= "flickr.module 0.5 Beta";
