Skip to content

Commit

Permalink
Fix PHP notice for Amplificator widget
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Aug 3, 2018
1 parent 6cf6332 commit 9a48421
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/WP_Auth0_SocialAmplification_Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ public function widget( $args, $instance ) {
}

$providers = array();
foreach ( $user_profile->identities as $identity ) {
$providers[] = $identity->provider;
if ( ! empty( $user_profile->identities ) ) {
foreach ( $user_profile->identities as $identity ) {
$providers[] = $identity->provider;
}
}

$providers = array_intersect( array_unique( $providers ), $supportedProviders );
Expand Down

0 comments on commit 9a48421

Please sign in to comment.