From 5ca497d53b8c09d4598fd73a5e73a032cf6731df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 1 Feb 2013 14:25:34 +0100 Subject: [PATCH] warnings --- SL/Layout/Javascript.pm | 3 +++ 1 file changed, 3 insertions(+) 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), ""); -- 2.20.1