Issues

ZF-7087: Zend_Service_Twitter_Search::search() 'since_id' param doesn't conform with Twitpocalypse

Description

The Twitpocalypse occurred on June 16th where ids for Twitter status updates exceeded the maxint value (2,147,483,647) - read about it here: http://www.twitpocalypse.com

In Zend_Service_Twitter_Search in the search() function on line 150 it casts the since_id param to an integer which will take this number down.

The fix for this is simple - you can just change this:

    foreach($params as $key=>$param) {
        switch($key) {
            case 'geocode':
            case 'lang':
                $_query[$key] = $param;
                break;
            case 'rpp':
                $_query[$key] = (intval($param) > 100) ? 100 : intval($param);
                break;
            case 'since_id':
            case 'page':
                $_query[$key] = intval($param);
                break;
            case 'show_user':
                $_query[$key] = 'true';
        }
    }

to this:

    foreach($params as $key=>$param) {
        switch($key) {
            case 'geocode':
            case 'lang':
            case 'since_id':
                $_query[$key] = $param;
                break;
            case 'rpp':
                $_query[$key] = (intval($param) > 100) ? 100 : intval($param);
                break;
            case 'page':
                $_query[$key] = intval($param);
                break;
            case 'show_user':
                $_query[$key] = 'true';
        }
    }

Comments

Merged into the release branch with r16307