This is the error found in admin area:
Notice: Undefined index: menu in admin_menu_admin_menu_output_alter() (line 612 of /var/www/sites/all/modules/admin_menu/admin_menu.module).
Warning:Invalid argument supplied for foreach() in
admin_menu_admin_menu_output_alter() (line 612 of
/var/www/sites/all/modules/admin_menu/admin_menu.module).
Code is:
/**
* Implements hook_admin_menu_output_alter().
*/
function admin_menu_admin_menu_output_alter(&$content) {
foreach ($content['menu'] as $key => $link) {
// Move local tasks on 'admin' into icon menu.
if ($key == 'admin/tasks' || $key == 'admin/index') {
$content['icon']['icon'][$key] = $link;
unset($content['menu'][$key]);
}
}
}
Foreach is line:612
What is the error in this code?
Thanks in advance.