Error message

Strict warning: Only variables should be passed by reference in eval() (line 3 of /var/www/clients/client232/web273/web/arch/modules/php/php.module(80) : eval()'d code).

Subject of educational works

$item = menu_get_item();
$tree = menu_tree_page_data(menu_get_active_menu_name());
list($key, $curr) = each($tree); //print_r($tree);

while ($curr) {
// Terminate the loop when we find the current path in the active trail.
if ($curr['link']['href'] == $item['href']) {
$tree = $curr['below'];
$curr = FALSE;
}
else {
// Add the link if it's in the active trail, then move to the link below.
if ($curr['link']['in_active_trail']) {
$tree = $curr['below'] ? $curr['below'] : array();
}
list($key, $curr) = each($tree);
}
}
$menuhtml = theme_menu_tree(menu_tree_output($tree));
print $menuhtml;
?>