Commit d733399f authored by dave%intrec.com's avatar dave%intrec.com

Fix for bug 46913: xml.cgi produces SQL error when accessed while not

logged in yet. Thanks to luke_harless@attglobal.net for discovering this one.
parent 3a93ee47
......@@ -101,6 +101,7 @@ sub initBug {
$self->{'whoid'} = $user_id;
&::SendSQL("SELECT groupset FROM profiles WHERE userid=$self->{'whoid'}");
my $usergroupset = &::FetchOneColumn();
if (!$usergroupset) { $usergroupset = '0' }
$self->{'usergroupset'} = $usergroupset;
my $query = "
......
......@@ -101,6 +101,7 @@ sub initBug {
$self->{'whoid'} = $user_id;
&::SendSQL("SELECT groupset FROM profiles WHERE userid=$self->{'whoid'}");
my $usergroupset = &::FetchOneColumn();
if (!$usergroupset) { $usergroupset = '0' }
$self->{'usergroupset'} = $usergroupset;
my $query = "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment