warning: Illegal offset type in /home/name/public_html/modules/buddylist/buddylist.module on line 48.

also on line 53 and 56

I fixed this by static casting the $buddies[$uid][$key]; to be $buddies[(string)$uid][$key]; on all three lines. Seems to have worked.

This is using php 5.0.4, Drupal 4.7.0-beta4, and the module buddylist 4.7.0

Comments

robertdouglass’s picture

I'll take a look. Thanks for reporting. In the future, please provide patches... it is the "Drupal way".

robertdouglass’s picture

The string "$buddies[$uid][$key]" doesn't exist in the 4-7 version of buddylist. Please indicate which version you're using and if this is still a problem. I'm referring to version
// $Id: buddylist.module,v 1.48.2.8 2006/05/06 11:30:24 robertDouglass Exp $

You find that at the top of the file.

quicksketch’s picture

Status: Active » Closed (fixed)

It looks like we're refering to version 1.48.2.1 of the buddylist module. I loaded up this version buddylist w/ PHP5 and Drupal 4.7.2 and could not repeat this problem (though I found others that have been fixed since then). This problem existed in the function buddylist_get_buddies(), but was probably caused by incorrect calls to this function (ie, by passing in parameters that were not strings or integers). Since I couldn't repeat this problem, I'm closing this issue. Please reopen if the problem is found with the latest buddylist/drupal.