Quote:
Originally Posted by tilight
Just installed everything brand new, and I got this error when I tried to go to Request/Bugs Tracker Types in my AdminCP:
Parse error: parse error
in /home2/volvinet/public_html/forums/admincp/bugsadmin.php on line 75
Also when I go to bugs.php I get thie at the top of the page (before my header):
Warning: Invalid argument supplied for foreach() in /home2/volvinet/public_html/forums/bugs.php on line 138
Warning: Invalid argument supplied for foreach() in /home2/volvinet/public_html/forums/bugs.php on line 144
Warning: Invalid argument supplied for foreach() in /home2/volvinet/public_html/forums/bugs.php on line 150
|
Change:
PHP Code:
foreach($bugcache[$tablename] as $id => $currow)
{
if ($selvalue == $id)
{
echo "<option value=\"$id\" selected=\"selected\">$currow[$titlefield]</option>\n";
} else {
echo "<option value=\"$id\">$currow[$titlefield]</option>\n";
}
} else {
$result=$DB_site->query("SELECT $idfield,$titlefield FROM $tablename $filter ORDER BY $order");
while ($currow=$DB_site->fetch_array($result))
{
if ($selvalue==$currow[$idfield])
{
echo "<option value=\"$currow[$idfield]\" selected=\"selected\">$currow[$titlefield]</option>\n";
} else {
echo "<option value=\"$currow[$idfield]\">$currow[$titlefield]</option>\n";
}
}
}
to
PHP Code:
foreach($bugcache[$tablename] as $id => $currow)
{
if ($selvalue == $id)
{
echo "<option value=\"$id\" selected=\"selected\">$currow[$titlefield]</option>\n";
} else {
echo "<option value=\"$id\">$currow[$titlefield]</option>\n";
}
}
$result = $DB_site->query("SELECT $idfield,$titlefield FROM $tablename $filter ORDER BY $order");
while ($currow = $DB_site->fetch_array($result))
{
if ($selvalue == $currow[$idfield])
{
echo "<option value=\"$currow[$idfield]\" selected=\"selected\">$currow[$titlefield]</option>\n";
} else {
echo "<option value=\"$currow[$idfield]\">$currow[$titlefield]</option>\n";
}
}
I had that
with a closed }
like if the for statement was an if statement. Stupid mistake

As for the second error, I don't see how that can be possaible. The "cashe" is built before those lines are even ran. Try the bugs.php file again. At the top of the file should just be $Id$. Going to put in revesion tags so I can keep track of what people have.
@ixian: What is your SF username?!