zendframework / ZendOAuth

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

The ->getAdapter() method does not set the adapter if passed in config o... #16

Closed lorenzoferrarajr closed 10 years ago

lorenzoferrarajr commented 10 years ago

This push relates to this issue https://github.com/zendframework/ZendService_Twitter/pull/18

->getAdapter() method of parent class ZendOAuth\Client is:

public function getAdapter()
{
    if (! $this->adapter) {
        $this->setAdapter($this->config['adapter']);
    }

    return $this->adapter;
}

but here was:

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

replaced with:

public function getAdapter()
{
    return parent::getAdapter();
}
Maks3w commented 10 years ago

Thank you @lorenzoferrarajr But this issue is duplicated with #13, #14 and #15. Also override the method for just call to parent makes unnecessary override the method.

gbili commented 10 years ago

Any updates? When will ZendOAuth\Client::getAdapter() method be deleted?

internalsystemerror commented 10 years ago

The fix has already been applied in https://github.com/zendframework/ZendOAuth/pull/14. A release needs to be tagged to fix everyones issue. In the meantime, we'll all have to use dev-master for zendoauth.