• Resolved esquecreative

    (@esquecreative)


    Hi,

    awesome plugin, thanks. Was trying to do something similar, but my PHP skills are kinda too non-existent to pull this off right now.

    Anyway, I’m trying to add something like what you see in the admin bar of this page. “Hi, {first_name} {avatar}”. It works, except I get a warning every time the {avatar} shortcode is used:

    Warning: strlen() expects parameter 1 to be string, object given in /home/***/public_html/wp-includes/formatting.php on line 2875

    When I use {first_name} on its own, no problems.

    I’ve tried it with a commercial theme, and WP’s 2017 theme – both the same result. Any ideas on how to fix would be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @esquecreative – That honestly sounds like something is filtering get_avatar and returning an Object rather than a string. We use get_avatar to render them which is a built in WP function and returns a string. If an object is what is returned it definitely points to another plugin interfering. Can you try disabling other plugins, specifically those that would possibly deal with avatars or custom code.

    Thread Starter esquecreative

    (@esquecreative)

    @danieliser – Thanks for the speedy reply. Yes, seems like it might be the USERPRO plugin. Thanks for your assistance – much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘strlen() expects parameter 1 to be string’ is closed to new replies.