From 5e61ec5e01c8f6633f74968939f8fa6875dd32f7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 22 Aug 2011 23:53:34 -0400 Subject: [PATCH] avoid producing notices for last element in MoreMenu --- lib/moremenu.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/moremenu.php b/lib/moremenu.php index fa335b3c7b..8aed58a921 100644 --- a/lib/moremenu.php +++ b/lib/moremenu.php @@ -81,7 +81,12 @@ class MoreMenu extends Menu } foreach ($toShow as $item) { - list($actionName, $args, $label, $description, $id) = $item; + if (count($item) == 5) { + list($actionName, $args, $label, $description, $id) = $item; + } else { + list($actionName, $args, $label, $description) = $item; + $id = null; + } $this->item($actionName, $args, $label, $description, $id); }