WordPress.org

Ready to get started?Download WordPress

Forums

WP User Avatar
[resolved] Warning is displayed for unregistered user (3 posts)

  1. parrker
    Member
    Posted 1 year ago #

    Hello, I am using your plugin, version 1.2.4 on WP 3.5.1, and when I try to use the get_avatar function to display avatars of unregistered users, I get two warnings displayed.

    In the code, I pass the email as the first parameter, and the function actually returns the correct gravatar successfully, but I still get two warning messages:

    Notice: Trying to get property of non-object in {path-to-my-wp}\wp-content\plugins\wp-user-avatar\wp-user-avatar.php on line 313

    Notice: Trying to get property of non-object in {path-to-my-wp}\wp-content\plugins\wp-user-avatar\wp-user-avatar.php on line 314

    Of course, on the production server these messages will be hidden, but I thought it is a good idea to let you know there's a problem.

  2. Bangbay Siboliban
    Member
    Posted 1 year ago #

    Yes, I'm aware of the bug. It's because it's looking for the display name of the user, but isn't finding one. I will have a fix for it in the next version of the plugin.

  3. parrker
    Member
    Posted 1 year ago #

    Great! Thank you very much for your answer. I really like the plugin, and I wish all the best to you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic