Issues

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

Issue Type: Bug Created: 2009-06-22T13:13:14.000+0000 Last Updated: 2009-07-31T20:59:38.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: Sam Sandberg (loisaidasam) Assignee: Jon Whitcraft (sidhighwind) Tags: - Zend_Service_Twitter

Related issues: Attachments:

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts