I get the exact same error. Finally after installing everything properly, this is the last error that I can't seem to fix. I've narrowed down the location of the error and it is in this code snippet:
$db =& JFactory::getDBO();
$query = 'SELECT id, menutype, name, link, type, parent FROM #__menu WHERE published=1 ORDER BY menutype, parent, ordering';
$db->setQuery($query);
$mitems = $db->loadObjectList();
$children = array();
foreach($mitems as $v)
{
$pt = $v->parent;
$list = @$children[$pt] ? $children[$pt] : array();
array_push($list, $v);
$children[$pt] = $list;
}
It is in the line: foreach($mitems as $v) that we are getting the error. I am not sure if the query is incorrect, or if it needs a check that $mitems is not empty, or something else. Hopefully this can be solved.