In my test setup I have 2 buddies online, but the buddy list popup shows anonymous users as buddies with offline status, and notices show up:
Notice: Trying to get property of non-object in nodejs_buddylist_block_content() (line 97 of /home/devel/500/www/drupalnodejs/sites/all/modules/nodejs/nodejs_buddylist/nodejs_buddylist.module).
Notice: Trying to get property of non-object in nodejs_buddylist_block_content() (line 98 of /home/devel/500/www/drupalnodejs/sites/all/modules/nodejs/nodejs_buddylist/nodejs_buddylist.module).
Notice: Trying to get property of non-object in theme_nodejs_buddylist_chat_button() (line 124 of /home/devel/500/www/drupalnodejs/sites/all/modules/nodejs/nodejs_buddylist/nodejs_buddylist.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | nodejs_buddylist-user_load-2677472-10904352-7.x.patch | 639 bytes | pedrop |
Comments
Comment #2
pedrop CreditAttribution: pedrop at Brainsum commentedThis simple patch solved the problem for me.
Comment #3
pedrop CreditAttribution: pedrop at Brainsum commentedComment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks for the patch.
however, there seems to be something else happening.
nodejs_buddylist_user_list($account)
just wrapsflag_friend_get_friends
, which does this:not sure why the user_load() would succeed in nodejs_buddylist_block_content() but not in flag_friend_get_friends(). maybe we could still add something like this code, but i'm hesitant until i understand why the flag_friend code is not loading the user objects.