From c345944814d217a00b73824747ed34725f311f10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 10 Oct 2017 12:30:07 +0200 Subject: [PATCH] Menu: Keine nodes mehr ohne id erlauben. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Dir werden während des erstellens der Baumstruktur nach id indiziert, und so gibt das potentielle Kollisionen --- SL/Menu.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SL/Menu.pm b/SL/Menu.pm index b91611242..800f000b2 100644 --- a/SL/Menu.pm +++ b/SL/Menu.pm @@ -73,6 +73,8 @@ sub _merge { for my $node (@$data) { my $id = $node->{id}; + die "menu: node with name '$node->{name}' does not have an id" if !$id; + my $merge_to = $by_id->{$id}; if (!$merge_to) { -- 2.20.1