Accessing ban menu triggers errors for undefined index "sa"

Started by Julius_2000, January 24, 2023, 02:14:55 PM

Previous topic - Next topic

Julius_2000

Hi all,

I just noticed that SMF generates errors for undefined index 'sa' when I enter the ban menu for the following lines in ManageBans.php :
Line 57
Line 62
Line 67
Line 72
of this code:
// Tabs for browsing the different ban functions.
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => $txt['ban_title'],
'help' => 'ban_members',
'description' => $txt['ban_description'],
'tabs' => array(
'list' => array(
'description' => $txt['ban_description'],
'href' => $scripturl . '?action=admin;area=ban;sa=list',
'is_selected' => $_REQUEST['sa'] == 'list' || $_REQUEST['sa'] == 'edit' || $_REQUEST['sa'] == 'edittrigger',
),
'add' => array(
'description' => $txt['ban_description'],
'href' => $scripturl . '?action=admin;area=ban;sa=add',
'is_selected' => $_REQUEST['sa'] == 'add',
),
'browse' => array(
'description' => $txt['ban_trigger_browse_description'],
'href' => $scripturl . '?action=admin;area=ban;sa=browse',
'is_selected' => $_REQUEST['sa'] == 'browse',
),
'log' => array(
'description' => $txt['ban_log_description'],
'href' => $scripturl . '?action=admin;area=ban;sa=log',
'is_selected' => $_REQUEST['sa'] == 'log',
'is_last' => true,
),

I don't think I ever tempered with this.

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

Julius_2000

Got it, thank you! Good to know. Usually I roll my eyes and ask myself "what did you do now?" So, I'm glad it's not me :D

Advertisement: