onelogin / onelogin-php-sdk

MIT License
12 stars 18 forks source link

Error with getEnrolledFactors($userId) #22

Open olepogam-studi opened 1 year ago

olepogam-studi commented 1 year ago

Proposed patch to OneLoginClient.php :

226c226
<         if (count($data) == 1 && empty($data[0])) {
---
>         if (is_array($data) && count($data) == 1 && empty($data[0])) {
2177a2178,2183
>                     if (!property_exists($otpDeviceData, 'phone_number')) {
>                         $otpDeviceData->phone_number = '';
>                     }
>                     if (!property_exists($otpDeviceData, 'state_token')) {
>                         $otpDeviceData->state_token = '';
>                     }