}
}
- function item($actionName, $args, $label, $description, $id=null, $cls=null)
+ function item($actionName, array $args, $label, $description, $id=null, $cls=null)
{
if (empty($id)) {
$id = $this->menuItemID($actionName, $args);
{
if ($actionName != $this->actionName) {
return false;
+ } elseif (!is_array($args)) {
+ /*
+ * No array, then the below loop doesn't need to run and
+ * 'return false' will never be reached.
+ */
+ return true;
}
foreach ($this->actionArgs as $k => $v) {
return true;
}
-
+
function menuItemID($actionName, $args = null)
{
$id = sprintf('nav_%s', $actionName);
-
+
if (!is_null($args)) {
foreach ($args as $key => $value) {
$id .= '_' . $key . '_' . $value;