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 Jul 31, 2018
1 parent e072d1e commit b673cad
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 b673cad

Please sign in to comment.