Skip to content


Bug fix: photos_getNotInSet()

All versions up through 1.3.1 have had a bug in photos_getNotInSet(). If a call is made while there is only one photo not in a set, the array structure of the result won't be quite the same. This is because of the way that the xml parser arranges things. If this is a concern, replace the entire function (starting on line 596 in phpFlickr.php) with the code below. I've fixed the problem in CVS and the next update will have the correct code.

    function photos_getNotInSet($extras = NULL, $per_page = NULL, $page = NULL)
    {
        
/* http://www.flickr.com/services/api/flickr.photos.getNotInSet.html */
        
if (is_array($extras)) {
            
$extras = implode(",", $extras);
        }
        
$this->request("flickr.photos.getNotInSet", array("extras"=>$extras, "per_page"=>$per_page, "page"=>$page));
        
$this->parse_response();
        
$result = $this->parsed_response['rsp']["photos"];
        if (!empty(
$result['photo']['id'])) {
            
$tmp = $result['photo'];
            unset(
$result['photo']);
            
$result['photo'][] = $tmp;
        }
        return
$result;
    }

Posted in Bug Fixes.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Otavio says

    Hi! Greate work!

    I did my photolog using the phpFlickr here.

    Can I send you the PHP file? (if u wanna post as an example :D )

    Cya!

    ReplyReply



Some HTML is OK

or, reply to this post via trackback.