• Resolved dayin

    (@dayin)


    When I have WP First Letter Avatar activated I’m getting the following error message (in my error logs) when logged into WP admin and viewing my blog –

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object

    I can clear this error message by removing (or commenting out) the following code from WP First Letter Avatar –

    add_action('admin_bar_menu', function(){
    	add_filter('get_avatar', array($this, 'set_userbar_avatar'), 10, 5);
    		},0);
     add_action('wp_after_admin_bar_render', function(){
    	remove_filter('get_avatar', array($this, 'set_userbar_avatar'), 10);
    		});

    However by removing this code, every time I approve a new comment, my avatar (in the top right hand corner of admin bar) changes to a first letter avatar.

    Any help would be appreciated.

    https://www.ads-software.com/plugins/wp-first-letter-avatar/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author DanielAGW

    (@danielagw)

    Hi,
    Thanks for the report. This is the 2nd time somebody is reporting this error, so there must be something wrong with WP First Letter Avatar. Unfortunately, I can’t recreate this warning – it never happened to me. Can you help me recreate this problem in my test WordPress environment, so I can experiment with this? I am sure there must be some conflict with a plugin or theme function maybe. What other plugins are you using? What theme is this? Maybe there is some other login/avatar plugin that you are using? Do you think you can try disable your other plugins to see if it helps? If it does help, start enabling the plugins until you get the warning again, that way we would find out where is the conflict.

    I am more than willing to find the root of this problem, but I just don’t get this warning in my WordPress installation. Any help will be appreciated.

    Thread Starter dayin

    (@dayin)

    Thanks for getting back to me Daniel. I’ve deactivated all plugins, with the exception of WP First Letter Avatar but the error message still appears. If it’s any help the full error is as follows

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /wp-includes/plugin.php on line 213

    Plugin Author DanielAGW

    (@danielagw)

    I believe I fixed the problem. Please update the plugin. What is interesting is that this problem wasn’t happening to me in localhost, just on remote server. Weird, I will look deeper into it.
    Thanks for your help. If you have any more problems (or if by any chance, this one wasn’t 100% fixed), please feel free to report.

    Cheers,
    Daniel

    Thread Starter dayin

    (@dayin)

    Thanks Daniel.

    Thread Starter dayin

    (@dayin)

    Hi Daniel. Just letting you know that the same error message has returned on versions 1.2.6 and 1.2.7 of WP First Letter Avatar.

    Plugin Author DanielAGW

    (@danielagw)

    Hi,
    The reason why it is happening is because you probably have PHP 5.3 or lower. PHP 5.3 is very old now – minimum required for WP First Letter Avatar is PHP 5.4.

    P.S. I really advise you to update your PHP. 5.3 is not maintained anymore and it is unsafe to use it. Please contact your hosting provider if you don’t know how to change the PHP version (it’s very easy thing to do).

    And just to make sure, check exactly what PHP version you currently have. You can use phpinfo() function for this or, for example, this plugin – https://www.ads-software.com/plugins/display-php-version/

    Thread Starter dayin

    (@dayin)

    I’ve updated PHP and the error message no longer appears. Thanks for all your help Daniel.

    Plugin Author DanielAGW

    (@danielagw)

    Great, thanks for letting me know!

    Cheers,
    Dan

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error Message’ is closed to new replies.