Skip to content

Token refresh fails #7

@syslogic

Description

@syslogic

In method refresh_token() it is being assumed that an array is being returned, which is not the case:

array_key_exists("access_token", $result)

Therefore it should rather be:

property_exists($result, "access_token")

Previously type-checking the $result could prevent passing the wrong data-type:

if (
    $result == null ||
    is_array($result) && !array_key_exists("access_token", $result) ||
    is_object($result) && !property_exists($result, "access_token")
)  {
    return null;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions