Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2005, 10:38 AM
tscbh tscbh is offline
 
Join Date: Jun 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Warning: array_merge() ERROR

I read through some of the similar error message from this forum, but I got a very weird problem. Yes, I am using vb 3.0.7 and running php5 under windows. The actually error message was:

Quote:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in \online.php on line 285;
When I first view who's online page, there is no error. 60 seconds later when WOL auto refresh I got that error message. Could any one tell me how I can fix this.

I follow the suggestion from Xenon(busy admin) https://vborg.vbsupport.ru/showthrea...28%29+Argument

I put the following section of code on online.php before global.php is called, but I still get the same error message:

Quote:
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();
If anyone have any suggestion, please let me know.
Thanks in advance.
Reply With Quote
  #2  
Old 07-09-2005, 11:58 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you post some lines around 285

it just means that ther secund argument isn't an array, maybe you ahve installed an hack, and the hack author didn't initialize the variables properly
Reply With Quote
  #3  
Old 07-09-2005, 12:06 PM
tscbh tscbh is offline
 
Join Date: Jun 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here are the line around 285 on the online.php file:

PHP Code:
if (!$foundviewer AND $bbuserinfo['userid'] AND ($who == '' OR $who == 'members'))
// Viewing user did not show up so fake him
    
$userinfo["$bbuserinfo[userid]"] = $bbuserinfo;
    
$userinfo["$bbuserinfo[userid]"]['location'] = '/online.php';
    
$userinfo["$bbuserinfo[userid]"]['host'] = IPADDRESS;
    
$userinfo["$bbuserinfo[userid]"]['lastactivity'] = TIMENOW;
    
$userinfo["$bbuserinfo[userid]"]['joingroupid'] = iif($bbuserinfo['displaygroupid'] == 0$bbuserinfo['usergroupid'], $bbuserinfo['displaygroupid']);
    
$userinfo["$bbuserinfo[userid]"]['musername'] = fetch_musername($userinfo["$bbuserinfo[userid]"], 'joingroupid');
    
$userinfo["$bbuserinfo[userid]"]['hidden'] = iif($bbuserinfo['invisible'], '*');
    
$userinfo["$bbuserinfo[userid]"]['invisible'] = 0;

[
285]    $userinfo[$bbuserinfo['userid']] = array_merge($userinfo["$bbuserinfo[userid]"] , construct_im_icons($userinfo["$bbuserinfo[userid]"]));
    if (
$vboptions['WOLresolve'] AND ($permissions['wolpermissions'] & CANWHOSONLINEIP))
    {
        
$userinfo[$bbuserinfo['userid']]['host'] = @gethostbyaddr($userinfo["$bbuserinfo[userid]"]['host']);
    }


I installed, vbStatistic, vbAdvance, referral statistic, ushop & ucash, paypal reoccuring payment. I am not sure if I got too much hacks installed!

Anyway, thanks for your help Xenon.
Reply With Quote
  #4  
Old 07-09-2005, 12:13 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$userinfo[$bbuserinfo['userid']] = array_merge($userinfo["$bbuserinfo[userid]"] , construct_im_icons($userinfo["$bbuserinfo[userid]"])); 
the array_merge is wrong here. construct_im_icons() doesn't return an array.

change the line into
PHP Code:
construct_im_icons($userinfo); 
that should work then
Reply With Quote
  #5  
Old 07-09-2005, 12:19 PM
tscbh tscbh is offline
 
Join Date: Jun 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much Xenon, that's the quickest response I ever get. But I still get the same problem. I change to
Quote:
$userinfo[$bbuserinfo['userid']] = array_merge($userinfo["$bbuserinfo[userid]"] , construct_im_icons($userinfo));
as you told me. It didn't work. Same problem!
Reply With Quote
  #6  
Old 07-09-2005, 12:26 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you missunderstood my post.

you have to replace the complete line, not just that part
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04170 seconds
  • Memory Usage 2,232KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete