vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   error with plugin on vb4 (https://vborg.vbsupport.ru/showthread.php?t=257605)

turbosatan 01-22-2011 03:22 PM

error with plugin on vb4
 
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?


All times are GMT. The time now is 02:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01064 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete