MyBB Community Forums

Full Version: Array Merge Function Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/arena/public_html/forums/inc/class_session.php on line 388

Warning: Cannot modify header information - headers already sent by (output started at /home/arena/public_html/forums/inc/class_session.php:388) in /home/arena/public_html/forums/inc/functions.php on line 1118

For debugging purposes... here is the info of the server specs

PHP version: 5.2.0
MyBB version: 1.2.3
DB version: MySQLi 5.0.27
If I remember correctly this error was caused by a corrupt user group. (Meaning your $mybb->usergroup is corrupt)
Hmmm ok, well this would be for a guest account as everytime i try and login it says you are logged in and then reverts me back to the page not being logged in, so I'm positive I have some cookie issues to deal with, but that's an entirely different issue.

Nonetheless for this issue, the guest usergroup id would be 7. In the class_session list I have it set as follows
time = time();
$mybb->user['usergroup'] = 7;
$mybb->user['username'] = '';
$mybb->user['uid'] = 0;
$mybbgroups = 1;
$mybb->user['displaygroup'] = 7;

I've also tried putting the variable of $mybbgroups = 7 and had response. This is the only coding I have customly touched as I want all guests to be in usergroup 7 since this forum is implemented into something else. If I could log in I'd check to see if this error occured with login users, but I'm having login issues as well. Outside of that not really sure on what I should try.
See, you need to this through the ACP not custom code it in. Your missing the $mybb->usergroup array for usergroup 7.
Ummm it is added into the usergroup. If I remember correctly, usergroup with a gid of 7 was already one of the defaults and I just renamed it to Guests with a wonderful sql command. I also updated the usergroup via ACP to ensure everything was good.

Also, to further ensure that it was not that one change to class_sessions.php, I reverted class_sessions.php back to its default, which would put the guests on usergroup 1 and still got that error.
FYI, We already have a guests group. Why are you changing the banned usergroup to guests?
Hmm.. try rebuilding your usergroups cache.
Like I said, I use an implementation method of a customly created php game and in order for the users table to be identical to the games users table, I need a few variables to match at all times. One of those variables is the usergroup id, and on the game 7 is the usergroup id OF the guests. I did this in the two previous versions without a single bit of problem.

However, even when reverting it back to the default guest group which is usergroup ID #1, the error is coming up. Thus, I know it has nothing to do with the changes that I customly wrote in and has to do with an implementation issue on the game with possibly the PHP version or something along those lines. Therefore, do you need me to echo out some variables to give you more information or what so I can solve this issue?
Yeh, in class_session.php find:

// Gather a full permission set for this guest
$mybb->usergroup = usergroup_permissions($mybbgroups);
$mydisplaygroup = usergroup_displaygroup($mybb->user['displaygroup']);

Add after

echo "<pre>";
print_r($mybbgroups);
echo "</pre>";
echo "<pre>";
print_r($mybb->usergroup);
echo "</pre>";
echo "<pre>";
print_r($mydisplaygroup);
echo "</pre>";

Paste the results here.
http://forums.nodqarena.com/

As you can see, nothing shows up. Same error with no echoed text. I actually then ended up echoeing out random text such as iskajfklsdjfsdf and that didn't show up either. I deleted temporary internet files to make sure it wasn't a cache issue and triple checked that I was uploading the correct file, and had no sucess.
Can you upload your inc/class_session.php here.
Pages: 1 2