TinyPortal
Development => Support => Topic started by: oneway on June 28, 2006, 07:56:54 AM
I have hundreds of error messages from two lines in profile.php. The message is Undefined index: sa relating to 'action=profile'. It looks to me that maybe some code may be just a little misplaced, but what would I know. Here's the problem area:
// No Subaction?
$waction = $_REQUEST['sa'];
if (!isset($_REQUEST['sa']) || !isset($sa_allowed[$_REQUEST['sa']]))
{
$waction = $_REQUEST['sa'];
// Pick the first subaction you're allowed to see.
if ((allowedTo('profile_view_own') && $context['user']['is_owner']) || allowedTo('profile_view_any'))
$_REQUEST['sa'] = 'summary';
elseif (allowedTo('moderate_forum'))
$_REQUEST['sa'] = 'trackUser';
elseif (allowedTo('manage_permissions'))
$_REQUEST['sa'] = 'showPermissions';
elseif ((allowedTo('profile_identity_own') && $context['user']['is_owner']) || allowedTo('profile_identity_any') || allowedTo('manage_membergroups'))
$_REQUEST['sa'] = 'account';
elseif ((allowedTo('profile_extra_own') && $context['user']['is_owner']) || allowedTo('profile_extra_any'))
$_REQUEST['sa'] = 'forumProfile';
elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any'))
$_REQUEST['sa'] = 'deleteAccount';
else
isAllowedTo('profile_view_' . ($context['user']['is_owner'] ? 'own' : 'any'));
}
and the two problem lines are the same and both near the top:
$waction = $_REQUEST['sa'];
If there just need to be some 'swapsies' I can do it. Otherwise I may need help.
Thanks, guys!
What version of SMF, What version of TP, any other mods beside TP installed?
Quote from: G6 on June 28, 2006, 09:30:55 AM
What version of SMF, What version of TP, any other mods beside TP installed?
Oh dear, G6, I'm hopeless. Forgot again, sorry! SMF 1.1RC2, TP 0.86, Custom Action Mod 2.0, and Referral Module. This error may be related to the latter, profile.php being one of the files it modifies.
$_REQUEST['sa'] does not appear anywhere above the code I posted.
Thanks.
Hmm... strange, today the hundreds of errors I reported here seem to have stopped. So I find myself asking, "What'd I do, what'd I do?" Answer: nothing so far as I know!
Anyway, hopefully things will stay this way.