Notice: Undefined offset: 0 in I:\www\wedge\trunk\Sources\Subs-BoardIndex.php on line 476
The mod category still shows up just fine.
Will this happen to some crazy person other than me?
This topic was marked solved by its starter, on February 5th, 2014, 12:48 AM
if ($key == -1)
{
$cats = array_keys($categories);
$key = $cats[0];
$after = false;
}
$categories = array_insert($categories, $key, $thiscat, $after); if ($key == -1)
{
$cats = array_keys($categories);
$key = !empty($cats) ? $cats[0] : 0;
$after = false;
}
$categories = array_insert($categories, $key, $thiscat, $after);Ah, yes, I see the problem and it will affect anyone. If there's a situation where you're viewing the board index without any visible categories it'll throw the error. And if there's no visible boards, there's no visible categories.Code: [Select] if ($key == -1)
{
$cats = array_keys($categories);
$key = $cats[0];
$after = false;
}
$categories = array_insert($categories, $key, $thiscat, $after);
is the current code... I'm guessing it should be:Code: [Select] if ($key == -1)
{
$cats = array_keys($categories);
$key = !empty($cats) ? $cats[0] : 0;
$after = false;
}
$categories = array_insert($categories, $key, $thiscat, $after);