Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Adapter is null when using ZendOAuth with ZendService\Twitter API #25

Open
smallred opened this issue May 7, 2014 · 4 comments
Open

Comments

@smallred
Copy link

smallred commented May 7, 2014

I get an error trying to use ZendOAuth with the ZendService\Twitter API. The ZendOAuth\Client class extends the Zend class and has implemented its own getAdapter method. My fix was to defer to the parent getAdapter method if the adapter is null.

My fix is below:

public function getAdapter() {
        $adapter = $this->adapter;

        if (! $adapter) {
            $adapter = parent::getAdapter();
        }

        return $adapter;
    }

It looks like this has been an issue for 6 or 8 months.

I believe this is the same issue:

zendframework/zendframework#5074

I'm using the following versions:

Zend 2.3.1
ZendService\Twitter 2.1.0
ZendOAuth 2.0.2

Thanks

@internalsystemerror
Copy link

#14 fixes this issue. Can we get a release tagged so that we don't have to rely on dev-master? Last tagged release was 2 years ago?

@smallred
Copy link
Author

I changed to use the dev-master as suggested and that indeed fixed the issue. It does feel wrong to be using dev-master in production code. I would also love to see a new stable release. It seems like many others are running into the same issue.

@oleksii-novikov
Copy link

Could you please make new stable release with fix this issue? For now I must use dev-master

Thanks in advance!

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-oauth; a new issue has been opened at laminas/laminas-oauth#3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants