avoid producing notices for last element in MoreMenu

This commit is contained in:
Evan Prodromou 2011-08-22 23:53:34 -04:00
parent 2b55641a9f
commit 5e61ec5e01

View File

@ -81,7 +81,12 @@ class MoreMenu extends Menu
} }
foreach ($toShow as $item) { 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); $this->item($actionName, $args, $label, $description, $id);
} }