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 2, 2018
1 parent 4647e97 commit da0482e
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 da0482e

Please sign in to comment.