the flickr module returns an error when no photosets are found (tries to do a foreach() on an empty array)

this should do the trick:

on ~ line 108 of flickr.module replace

      foreach ($settree['rsp']['photosets'] as $album_id => $album_details) {
        $output .= theme('flickr_photoset', $album_details, $album_id, "_t");
      }

with

      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");
        }
      }
CommentFileSizeAuthor
flickr.module.patch645 bytesbobthecow

Comments

bobthecow’s picture

Status: Needs review » Closed (duplicate)

duplicate. older post over here.

bobthecow’s picture

sorry. link was supposed to be here