Undefined index: HTTP_USER_AGENT
Posted: 30 May 2013, 18:59
This seems to have done it so far viewtopic.php?f=43&p=15540#p15539
Database and Demo for phpBB3 BBCodes, Mods and Smilies
https://phpbb3bbcodes.com/
Then you wont display browser info.martin123456 wrote:The error has come bk but i think i just found the fix so it's being tested.
find and removefind and removeCode: Select all
$browser = $_SERVER['HTTP_USER_AGENT'];
seems to have done it and the mod is still working as it should so far fingers crossed.Code: Select all
'USER_BROWSER' => $browser,
Code: Select all
$browser = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id: error.php,v 1.0 2011/05/31 15:49:44 stoker Exp $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/error');
// Get the avatar
if (!function_exists('get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
$base_url = generate_board_url() . '/';
$ip = $_SERVER['REMOTE_ADDR'];
$browser = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
$mode = request_var('mode', '');
switch ($mode)
{
case '400':
page_header($user->lang['ERROR_TITLE400']);
$template->set_filenames(array(
'body' => 'error/400_body.html')
);
break;
case '401':
page_header($user->lang['ERROR_TITLE401']);
$template->set_filenames(array(
'body' => 'error/401_body.html')
);
break;
case '403':
page_header($user->lang['ERROR_TITLE403']);
$template->set_filenames(array(
'body' => 'error/403_body.html')
);
break;
case '404':
page_header($user->lang['ERROR_TITLE404']);
$template->set_filenames(array(
'body' => 'error/404_body.html')
);
break;
case '500':
page_header($user->lang['ERROR_TITLE500']);
$template->set_filenames(array(
'body' => 'error/500_body.html')
);
break;
}
$template->assign_vars(array(
'S_ERROR_PAGE' => true,
'U_FORUM_BASE' => $base_url,
'USER_AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
'USERNAME' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
'USER_IP' => $ip,
'USER_BROWSER' => $browser,
));
page_footer();
?>
nubStoker wrote:I made a mistake last time I closed Fielzilla