Closed (duplicate)
Project:
Flickr Module
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Sep 2006 at 08:46 UTC
Updated:
15 Sep 2006 at 11:40 UTC
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");
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| flickr.module.patch | 645 bytes | bobthecow |
Comments
Comment #1
bobthecow commentedduplicate. older post over here.
Comment #2
bobthecow commentedsorry. link was supposed to be here