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
Posted by Jon Whitcraft (sidhighwind) on 2009-06-26T05:22:13.000+0000
Merged into the release branch with r16307