Title: [Plugin: User Avatar] Broken code in 3.1
Last modified: August 19, 2016

---

# [Plugin: User Avatar] Broken code in 3.1

 *  [Sperry77](https://wordpress.org/support/users/sperry77/)
 * (@sperry77)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/)
 * It works – but when users attempt to upload a photo – they get this text 2x:
   “
   Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/
   wp-admin/includes/plugin.php on line 1264”
 * You can ignore the warning and continue and everything works fine, but I’m afraid
   that warning will scare people away from uploading a photo. Can you please fix?
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Enej Bajgorić](https://wordpress.org/support/users/enej/)
 * (@enej)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/#post-1988335)
 * Hi Sperry77
 * This error could be due to a different plugin that is installed on your wordpress
   instance.
 * Can you see if it still appears if you disable all the other plugins except user-
   avatar.
 * Another suggestions would be to remove warning reporting on your live site and
   only have warning display on your development instance.
 * Cheers Enej
 *  Thread Starter [Sperry77](https://wordpress.org/support/users/sperry77/)
 * (@sperry77)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/#post-1988341)
 * You were correct. It shows the Warning message when the [Plugin: WP Hide Dashboard]
   is installed alongside it. However, I really want this plugin installed as it
   removes the Dashboard menu, the Personal Options section and the Help link on
   the Profile page and prevents Dashboard access to users assigned to the Subscriber
   role.
 * Any ideas for a fix?
 *  Plugin Contributor [Enej Bajgorić](https://wordpress.org/support/users/enej/)
 * (@enej)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/#post-1988391)
 * I am no sure… I took a short look at the WP Hide Dashboard and I can’t say why
   the error happends exactly. I would turn warnings off on your production server
   and try to fix it in the development. Make sure that the plugin is not loaded
   on the pages so it will not break them.
 * Ask for help from wp-hide-dashboard users.
 *  [cinoslaw](https://wordpress.org/support/users/cinoslaw/)
 * (@cinoslaw)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/#post-1988480)
 * Also have this problem … 🙂
 *  Plugin Contributor [Enej Bajgorić](https://wordpress.org/support/users/enej/)
 * (@enej)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/#post-1988483)
 * I did some changed to the plugin that might have fixed this issue are you running
   the latest version. I am sorry but I can’t make sure that the plugin doesn’t 
   break every plugin. I am just trying to follow best practices and hope for the
   best.
 * If you create a fix for the issue let me know.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: User Avatar] Broken code in 3.1’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-avatar.svg)
 * [User Avatar](https://wordpress.org/plugins/user-avatar/)
 * [Support Threads](https://wordpress.org/support/plugin/user-avatar/)
 * [Active Topics](https://wordpress.org/support/plugin/user-avatar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-avatar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-avatar/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Enej Bajgorić](https://wordpress.org/support/users/enej/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-user-avatar-broken-code-in-31/#post-1988483)
 * Status: not resolved