MyBB Community Forums

Full Version: PHP ERROR - please help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

I was trying to add spoilers to my forum, and I did not really know what I was doing and now my site wont load?


What error log says:

PHP Parse error: syntax error, unexpected '}' in /home/myftpname/public_html/global.php on line 727


The code at line 725-730

case 1:

			$login_username = $lang->login_username; < this is line 727

			break;

		case 2:

			$login_username = $lang->login_username2;

			break;

		default:

			$login_username = $lang->login_username;

			break;


Please help fast, thanks!
have you edited global.php file for any purpose ?
I'd suggest to revert it back (upload original global.php file) & use plugins for spoiler / other requirements
(2013-09-02, 01:31 PM).m. Wrote: [ -> ]have you edited global.php file for any purpose ?
I'd suggest to revert it back (upload original global.php file) & use plugins for spoiler / other requirements



I have not edited apart from that, I just reverted it and the site still wont load, and the error log has not changed?
^ can you post 5 lines above of code case 1:
(2013-09-02, 01:50 PM).m. Wrote: [ -> ]^ can you post 5 lines above of code case 1:

Here, also I messed up in the op I put this was line 737, but I just re-read error log and it is line 727 which is in error log but it is still not working anyway here is 5 lines above.



// Otherwise, we have a guest

else

{

	switch($mybb->settings['username_method'])

	{

		case 0:

   $login_username = $lang->login_username;

			break;

		case 1:
^ unable to trace the cause for the referred error.
if you do not have the original global.php file then you can download it from here to replace.