MyBB Community Forums

Full Version: usercp line 3222 error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello I was testing some things today with my brother for our forum and we found a problem when going to the usercp.php?action=usergroups to join a new usergroup, right after you send your request to join, while you're being redirected, theres an error message at the top of the screen like this

http://i.imgur.com/eruMndC.jpg

I opened usercp.php from the root folder and search the line 3222 and took this secreenshot, hope it helps

http://i.imgur.com/ECb79fL.jpg

Heres my forum: akibadesu.com

And a test account..
Username: Test Account
Password: test123

I hope someone can help me fix this, thanks!
Add '}' to line 3222 and look what happens.
Hi, thanks for replying, I just tried that as you said but it gave me this error: usercp.php on line 3495
it said that unexpected '}'
Seems like a bug in the core - moving to 1.8 Bugs and Issues.

The error on submitting a join request appears when the group doesn't have any leaders assigned.
In that case, the $groupleaders[$usergroup['gid']] variable with an undefined index $usergroup['gid'] is being passed to foreach() at https://github.com/mybb/mybb/blob/featur....php#L3224. The mechanism should skip that loop on this circumstance.
Thanks guys, I just tried adding a leader and tried joining again and the error doesnt show up like that, I just need to remember to add leaders to groups, I didnt know about that bug, thanks!
Can confirm. Note that join requests need to be enabled.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2206

Thanks for contributing to MyBB!

Regards,
The MyBB Group