Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP FBconnect "Missing argument 5 for fbc_get_avatar()"


  • jezpas
    Participant

    @jezpas

    Hi!

    I just installed BPFB connect and it seems to be working. But under discussion settings a get a warning (five times) that says “Warning: Missing argument 5 for fbc_get_avatar() in /home/faceblog/public_html/se/wp-content/plugins/bp-fbconnect/includes/wp-facebookconnect/fbconnect.php on line 529”

    Line 529 (and below) in that file reads

    function fbc_get_avatar($avatar, $id_or_email, $dims, $size, $default) {
    if (!is_object($id_or_email)) {
    return $avatar;
    }

    if ($fbuid = fbc_get_fbuid($id_or_email->user_id)) {
    return render_fb_profile_pic($fbuid, $dims, $size);
    } else {
    return $avatar;
    }
    }

    Has anyone seen this before? Does anyone know have to fix it?

    /Jes

Viewing 5 replies - 1 through 5 (of 5 total)

  • jezpas
    Participant

    @jezpas

    I tried removing “, $default” (which logically would be argument 5 on line 529) and the warnings went away. The question is if this cripples any functionality?

    Anyone have a clue what it does?


    bigdawggi
    Participant

    @bigdawggi

    If you just make it a default of null, then if anything does ever try to pass it a 5th argument, they won’t get errors; and your errors will go away.

    function fbc_get_avatar($avatar, $id_or_email, $dims, $size, $default = null) {
    ...


    jezpas
    Participant

    @jezpas

    Thanks, it worked perfectly!

    I have the same problem. Will this fix be included in the next version of the FB-Connect plugin?

    If I apply this fix it will get overwritten the next time I update the plugin, which is not good, since I tend to forget I’ve done hacks and thus almost never do hacks;-)

    Well Oliver, you´d better setup a reminder because it is pretty likely there won´t be any updates of FB-connect PI unless some other developer continues with it.

    Any himself (who originally adapted it) made very clear that it is not one of his priorities, and we must respect that as he is the only person 100% devoted to Buddypress.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘BP FBconnect "Missing argument 5 for fbc_get_avatar()"’ is closed to new replies.
Skip to toolbar