Skip to content

Commit

Permalink
Fixed issue with cookie session storage transtyping
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Grevet committed Oct 21, 2014
1 parent d9917d1 commit 3eb0e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dailymotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ protected function getAccessToken($forceRefresh = false)
// Check if session is present and if it was created for the same grant type
// i.e: if the grant type to create the session was `AUTHORIZATION` and the current grant type is
// `CLIENT_CREDENTIALS`, we don't want to call the API on behalf of another user.
if (!empty($session) && isset($session['grant_type']) && ($session['grant_type'] === $this->grantType))
if (!empty($session) && isset($session['grant_type']) && ((int) $session['grant_type'] === $this->grantType))
{
if (!$forceRefresh && isset($session['access_token']))
{
Expand Down

0 comments on commit 3eb0e5a

Please sign in to comment.