SalmanAzmat / php-twitter

Automatically exported from code.google.com/p/php-twitter
0 stars 0 forks source link

twitterAvailable function in current release always returns false. Fix included. #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The twitterAvailable function is wrong. It always returns a false result.
Existing form:
    function twitterAvailable()
    {
        $request = 'http://twitter.com/help/test.' . $this->type;

        if( $this->objectify( $this->process($request) ) == 'ok' ){
            return true;
        }else{
            return false;
        }
    }

The function needs "->scalar" added to the objectify part, like this:
New form:
    function twitterAvailable()
    {
        $request = 'http://twitter.com/help/test.' . $this->type;

        if( $this->objectify( $this->process($request) )->scalar == 'ok' ){
            return true;
        }else{
            return false;
        }
    }

Original issue reported on code.google.com by geuis.te...@gmail.com on 20 Sep 2008 at 8:38

GoogleCodeExporter commented 8 years ago
I'm updating the library right now. Will look at this this weekend. Feel free 
to create a patch and submit back. 
You'll get props.

Original comment by emmenset...@gmail.com on 28 Feb 2009 at 1:17

GoogleCodeExporter commented 8 years ago
I can't confirm this, but it's an old issue so Twitter may have fixed their 
return
value. Twitter is up right now and the function is returning true. Closing as 
invalid.

Original comment by emmenset...@gmail.com on 28 Feb 2009 at 2:14

GoogleCodeExporter commented 8 years ago

Original comment by emmenset...@gmail.com on 28 Feb 2009 at 2:14