Skip to content

getFactors() Error #18

@lewisstancer

Description

@lewisstancer

The following error is displayed when attempting to getFactors for a User ID

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, stdClass given in /var/www/test/vendor/onelogin/api/src/OneLoginClient.php:226 Stack trace: #0 /var/www/test/vendor/onelogin/api/src/OneLoginClient.php(226): count() #1 /var/www/test/vendor/onelogin/api/src/OneLoginClient.php(2072): OneLogin\api\OneLoginClient->handleDataResponse() #2 /var/www/test/admin/debug.php(31): OneLogin\api\OneLoginClient->getFactors() #3 {main} thrown in /var/www/test/vendor/onelogin/api/src/OneLoginClient.php on line 226

PHP Code:

$client = new OneLoginClient($clientId, $clientSecret, $region);
$authFactors = $client->getFactors(77149912);
print_r($authFactors);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions