Skip to content

Commit

Permalink
don't bail out in revoke_token unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
aaemnnosttv committed Nov 14, 2019
1 parent 63e313a commit bd0526d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions includes/Core/Authentication/Clients/OAuth_Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,8 @@ public function refresh_token() {
* @since 1.0.0
*/
public function revoke_token() {
// Stop if google_client not initialized yet.
if ( ! $this->google_client instanceof Google_Client ) {
return;
}

try {
$this->google_client->revokeToken();
$this->get_client()->revokeToken();
} catch ( \Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement
// No special handling, we just need to make sure this goes through.
}
Expand Down

0 comments on commit bd0526d

Please sign in to comment.