Skip to content

Commit

Permalink
Update Hybrid lib v2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
haitv282 committed May 2, 2019
1 parent 7150a41 commit 413931e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Providers/Vkontakte.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ function getUserProfile()
// ask vkontakte api for user infos
$response = $this->api->api('getProfiles', 'GET', $params);

if (!isset($response->response[0]) || !isset($response->response[0]->uid) || isset($response->error)) {
if (isset($response->error)) {
throw new Exception("User profile request failed! {$this->providerId} returned an error #{$response->error->error_code}: {$response->error->error_msg}", 6);
} elseif (!isset($response->response[0]) || !isset($response->response[0]->uid)) {
throw new Exception("User profile request failed! {$this->providerId} returned an invalid response.", 6);
}

Expand Down

0 comments on commit 413931e

Please sign in to comment.