Menu

#152 Session error

open
nobody
5
2004-04-30
2004-04-30
Anonymous
No

Name: Seba
Email: gomera@tutopia.com

Hi, I think that you have an error en register.php

You validate that the session chat is set, so when is not set, you redirect to index.php.

if( !isset($_SESSION['chat']) )
{
header('Status: 302');
header('Location: '.$_SESSION['template']->get_poc_web_root().'/index.php');
exit;
}

But to do this, you use, other session (template)

This is validated above:

if ( !isset($_SESSION['template']) )
{
$template = &new POC_Template();
$_SESSION['template'] = $template;
}

Maybe is the default template... I just download it ;)

So, I think you should swap the IFs, 1st the template validation, then the chat session validation.

Bye.

PD: The error that displays is this:
Fatal error: Call to a member function on a non-object in /usr/local/www/vhosts/stafflocate.com/htdocs/chat/register.php on line 52

And that's because is trying to user $_SESSION["template"]->get_poc_web_root()

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.