Error in national flags mod after PHP upgrade.

Support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Forum rules
Please only request support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Post Reply
Novation
Member
Member
Posts: 78
Joined: 25 Jun 2009, 00:08
Contact:

Error in national flags mod after PHP upgrade.

Post by Novation »

After upgrading php 5.3.10 to 5.6.8, i have an error from the national flags mod...

Fatal error: Cannot redeclare check_for_file() (previously declared in forum\includes\functions_flag.php:24) in forum\includes\functions_flag.php on line 34

I have double/triple checked all my coding and there is nothing out of place from the installation guide.

If i remove the index.php entry to include functions_flag, the error disappears.

Code: Select all

function check_for_file()
{
	global $user, $phpEx, $phpbb_root_path;
	
	$lang_path = $phpbb_root_path . '/language/' . $user->data['user_lang'] . '/';
	$file = 'flag_lang' . $phpEx;
	// check for the lang file being there
	if (file_exists($lang_path . $file))
	{
		return true;
	}
	return false;
}
The closing tag below return false; is line 34

Hope someone can help.
Novation
Member
Member
Posts: 78
Joined: 25 Jun 2009, 00:08
Contact:

Re: Error in national flags mod after PHP upgrade.

Post by Novation »

I finally solved this problem.

National flags is setup for mchat on my forum. I removed the national flags include entries from within mchat and placed them into my portal index instead. :D

It took two days to locate the issue, but i got there in the end :beer:
Post Reply