google/google-api-php-client — pull request #147 by DavidAnderson684 (2014-04-04 16:16:18+00:00)
Title: Prevent PHP warnings if creation/expiry dates not known for access token

If $client->setAccessToken() is called with a token that was not obtained via this SDK, then later operations which call Google_Auth_OAuth2::isAccessTokenExpired() cause 2 PHP warnings. This check prevents those warnings.

The use case for using a token obtained from elsewhere is when migrating to this SDK from another solution, where a request token is stored and you don't want the user to be forced to re-authenticate upon an upgrade.