• Resolved Elliot Taylor

    (@raisonon)


    Using the following code I get some notices and no css class is outputed in the avatar. From the notice it seems the plugin is connected. Are you familiar with this issue?

    If I don’t include $img_args it outputs without notice.

    
    <?php
    $img_args = array('class'=>'rounded');
    echo get_avatar($user['ID'], 130, '', $img_args); 
    ?>
    

    Errors:

    Notice: Array to string conversion in /app/public/wp-includes/formatting.php on line 1031

    Notice: Array to string conversion in /app/public/wp-content/plugins/wp-user-avatar/includes/class-wp-user-avatar-functions.php on line 358

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @raisonon

    Please Go to WordPress wp-config file and define WP_DEBUG as ‘false’.

    define('WP_DEBUG', false);

    I hope this helps.

    Thanks

    Thread Starter Elliot Taylor

    (@raisonon)

    Hi Flippercode – Hiding notices is not a fix.

    Also, no CSS code is outputted as per the WP docs. Which is the other issue.

    Thanks for looking into this.

    Elliot

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error on custom class on get_avatar’ is closed to new replies.