Skip to content

Commit

Permalink
Avoid "Undefined property" error if picture is not fetched.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad authored and ovr committed Aug 29, 2018
1 parent 1524422 commit 66b841f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OAuth2/Provider/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function getIdentity(AccessTokenInterface $accessToken)
$user = $hydrator->hydrate(new User(), $result);
$user->emailVerified = true;

if ($result->picture) {
if (!empty($result->picture)) {
$user->pictureURL = $result->picture->data->url;
}

Expand Down

0 comments on commit 66b841f

Please sign in to comment.