update idpexception to account for empty strings
Some providers (ex. Google) specify an error response object which is an empty string in cases where a 403/401 are returned. This will force the exception to check that the value isset and it is not an empty string which will help prevent the Unknown error case from occurring.oauth1test
parent
ae0183803e
commit
a91f3788cb
|
@ -12,10 +12,10 @@ class IDPException extends \Exception
|
|||
|
||||
$code = isset($result['code']) ? $result['code'] : 0;
|
||||
|
||||
if (isset($result['error'])) {
|
||||
if (isset($result['error']) && $result['error'] !== '') {
|
||||
// OAuth 2.0 Draft 10 style
|
||||
$message = $result['error'];
|
||||
} elseif (isset($result['message'])) {
|
||||
} elseif (isset($result['message']) && $result['message'] !== '') {
|
||||
// cURL style
|
||||
$message = $result['message'];
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue