Minor bug in photosets_getPhotos()

Posted on Friday 16 December 2005

I forgot to add 7 characters to the function definition. Line 1085 in phpFlickr.php should be changed from:
    function photosets_getPhotos($photoset_id, $extras)
to:
    function photosets_getPhotos($photoset_id, $extras = NULL)

Sorry for the inconvenience.


1 Comment for 'Minor bug in photosets_getPhotos()'

  1.  
    January 10, 2007 | 2:26 am
     
    Hi Dan, The photosets_getPhotos() method doesn't accept arguments for $per_page or $page in the file phpFlickr.php. Here's the original code and my modifications. It works in my testing. Hope this helps. Thanks, Brendan http://www.bsfmedia.com ORIGINAL CODE: function photosets_getPhotos($photoset_id, $extras = NULL, $privacy_filter = NULL) { /* http://www.flickr.com/services/api/flickr.photosets.getPhotos.html */ $this->request("flickr.photosets.getPhotos", array("photoset_id" => $photoset_id, "extras" => $extras, "privacy_filter" => $privacy_filter)); return $this->parsed_response ? $this->parsed_response['photoset'] : false; } REVISED CODE: function photosets_getPhotos($photoset_id, $extras = NULL, $privacy_filter = NULL, $per_page = NULL, $page = NULL) { /* http://www.flickr.com/services/api/flickr.photosets.getPhotos.html */ $this->request("flickr.photosets.getPhotos", array("photoset_id" => $photoset_id, "extras" => $extras, "privacy_filter" => $privacy_filter, "per_page" => $per_page, "page" => $page)); return $this->parsed_response ? $this->parsed_response['photoset'] : false; } CALLED VIA PHP: $photos = $f->photosets_getPhotos($photoset_id, NULL, NULL, 1);

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI