diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 4cb9237daf..8a06296b16 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -1431,8 +1431,9 @@ function phpbb_attachment_extension_group_name()
 	while ($lang_dir = $db->sql_fetchfield('lang_dir'))
 	{
 		$lang_dir = basename($lang_dir);
+		$lang_file = $phpbb_root_path . 'language/' . $lang_dir . '/acp/attachments.' . $phpEx;
 
-		if (!file_exists($phpbb_root_path . 'language/' . $lang_dir . '/acp/attachments.' . $phpEx))
+		if (!file_exists($lang_file))
 		{
 			continue;
 		}