X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLayout%2FJavascript.pm;h=2cda0f45916e31f7f3b39f1075e55b72d95d3f59;hb=e36b34d301ba80bbb8f9ba2fe33608e153f8f71c;hp=c63b1f7c7ac0a031095f72113c7d391d6e7f2511;hpb=7647d46acbc2a8253c0afeac5c706c3eb76995d5;p=kivitendo-erp.git diff --git a/SL/Layout/Javascript.pm b/SL/Layout/Javascript.pm index c63b1f7c7..2cda0f459 100644 --- a/SL/Layout/Javascript.pm +++ b/SL/Layout/Javascript.pm @@ -110,10 +110,13 @@ sub create_menu { my $form = $main::form; my %myconfig = %main::myconfig; + $depth ||= 0; + die if ($depth * 1 > 5); my @menuorder = $menu->access_control(\%myconfig, $parent); $parent .= "--" if ($parent); + $parent ||= ''; foreach my $name (@menuorder) { substr($name, 0, length($parent), "");