Bug fix for OAuthException

This commit is contained in:
Alex Bilbie 2014-05-02 15:14:36 +01:00
parent 82c10c32fd
commit 184fac507b

View File

@ -29,9 +29,9 @@ class OAuthException extends \Exception
/** /**
* Throw a new exception * Throw a new exception
*/ */
public function __construct() public function __construct($msg = 'An error occured')
{ {
parent::__construct('An error occured'); parent::__construct($msg);
} }
/** /**
@ -66,7 +66,7 @@ class OAuthException extends \Exception
// include the "WWW-Authenticate" response header field // include the "WWW-Authenticate" response header field
// matching the authentication scheme used by the client. // matching the authentication scheme used by the client.
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
if ($error === 'invalid_client') { if ($this->errorType === 'invalid_client') {
$authScheme = null; $authScheme = null;
$request = new Request(); $request = new Request();
if ($request->server('PHP_AUTH_USER') !== null) { if ($request->server('PHP_AUTH_USER') !== null) {