PDA

View Full Version : error with plugin on vb4


turbosatan
01-22-2011, 03:22 PM
i am trying to use a plugin in vb4 and make the changes required in order for it to be properly vb 4 compatible.

i am getting this error

Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 5191

the line in question is

// just return the permissions for the user's primary group (user is only a member of a single group)
$user['permissions'] = $vbulletin->usergroupcache["$USERGROUPID"];

I found from reading other info on php that this means the $user variable needs to be declared as an array earlier in the script as otherwise it can be declared as some sort of other type bye the first value assigned to it. eg if it says $user = 1 then the variable would be an integer type and therefore cannot have other array variables assigned to it.

can anyone tell me what i need to do here

thanks

Lynne
01-22-2011, 03:38 PM
It says specifically that the return is a single number, so why would it need to be an array? Is $user used later on?

turbosatan
01-22-2011, 04:44 PM
im not sure.

i dont really understand it that well. i just know i get this error and want to avoid it. so i guess we could assume yes thisa is the second / third time where it is trying to assign a value to the variable but it has previously been defined as an integer?