Support » Plugin: BuddyPress First Letter Avatar » PHP Errors

  • Venutius

    (@venutius)


    Just got a few errors in my error log:

    [07-Dec-2018 18:30:11 UTC] PHP Notice: Trying to get property ‘user_nicename’ of non-object in /wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line 492
    [07-Dec-2018 18:30:11 UTC] PHP Notice: Trying to get property ‘data’ of non-object in /homepages/wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line 492
    [07-Dec-2018 18:30:11 UTC] PHP Notice: Trying to get property ‘display_name’ of non-object in /wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line 487
    [07-Dec-2018 18:30:11 UTC] PHP Notice: Trying to get property ‘data’ of non-object in /wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line 487
    [07-Dec-2018 18:30:11 UTC] PHP Notice: Trying to get property ‘user_email’ of non-object in /wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line 484
    [07-Dec-2018 18:30:11 UTC] PHP Notice: Trying to get property ‘data’ of non-object in /wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line 484

Viewing 1 replies (of 1 total)
  • Venutius

    (@venutius)

    As a first attempt at a fix I changed line 464 to this:

    			if (empty($id) && $id !== 0 && is_numeric( $id ) ){ // if id not specified (and id not equal 0)
    

    I added the is_numeric() check

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Errors’ is closed to new replies.