Hello - I'm seeing the following warnings when visiting my sites "home" (mysite/home) page:
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 666.
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 667.
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 673.
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 674.
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 675.
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 677.
# warning: Illegal offset type in /home/hollatv/public_html/modules/buddylist/buddylist.module on line 679.
There are additional lines in the warning... but they are repeats of some of the lines in the above snippet. I'm not sure if this is due to a conflict with some other module or a bug in the buddylist module.
thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | buddylist.module.patch | 655 bytes | domidc |
Comments
Comment #1
yelvington commentedI can duplicate this problem (currently with 5.x.1.0), but (so far) only when anonymous. When logged in, I don't get the error.
Can an anonymous user have buddies?
If not, shouldn't this function immediately return an empty array, rather than attempting to query the database and build a result set?
Comment #2
yelvington commentedA bit of debugging reveals that something -- probably some other module -- is calling buddylist_get_buddies() and passing the $user object, not a $uid, as the first argument. A check for is_object() makes the errors go away:
(edited to fix fatfingered paste)
Comment #3
domidc commentedI have duplicated the error when not logged in. When logged in the error doesnt occur. It is the activity module who is calling buddylist_get_buddies() in my case and it passes indeed the user as an object.
The fix works fine.
Comment #4
domidc commentedThis is my first patch. It's made with tortoise CVS and is based on the solution presented in comment #2.
Comment #5
toemaz commentedI can reproduce the problem and confirm that the fix works.
Comment #6
matt@antinomia commented@yelvington, I think you're right on. For me, activity.module calls:
...instead of using $account_id or $account->uid. Are you other folks using activity.module? If so let's move this to the activity.module queue.
Comment #7
matt@antinomia commentedChanging the status back to active, as the above patches the buddylist api, when the patch should likely be for the activity.module's incorrect use of the api.