A general error occured: General Error
» Could not get style data
On this (and all other occasions) it relates to bots using a style that has been disabled or deleted...
To fix the problem I add the following code to force the default style...
sessions.php
Code: Select all
if (!$this->theme)
{
// returns the group name for the passed id //
include($phpbb_root_path . 'includes/sgp_functions.' . $phpEx);
$grp = strtoupper(sgp_get_group_name($user->data['group_id']));
if ($grp == 'BOTS') // ADDED ADMIN FOR TESTING ONLY // || $grp == 'ADMINISTRATORS')
{
redirect(build_url('style') .'?style='. $config['default_style']);
}
else
{
trigger_error('Could not get style data', E_USER_ERROR);
}
}
Also, the official code uses hard coded language, should this not be $user->lang['COULD_NOT_GET_STYLE_DATA'] ?