zendframework / ZendOAuth

BSD 3-Clause "New" or "Revised" License
19 stars 22 forks source link

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

Open smallred opened 10 years ago

smallred commented 10 years ago

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:

https://github.com/zendframework/zf2/issues/5074

I'm using the following versions:

Zend 2.3.1 ZendService\Twitter 2.1.0 ZendOAuth 2.0.2

Thanks

internalsystemerror commented 10 years ago

https://github.com/zendframework/ZendOAuth/pull/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 commented 10 years ago

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 commented 10 years ago

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

Thanks in advance!

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-oauth; a new issue has been opened at https://github.com/laminas/laminas-oauth/issues/3.