diff --git a/vendor/blobt/widgets/Menu.php b/vendor/blobt/widgets/Menu.php index 6a362b4..13e2dfa 100644 --- a/vendor/blobt/widgets/Menu.php +++ b/vendor/blobt/widgets/Menu.php @@ -186,13 +186,14 @@ class Menu extends Widget { */ protected function renderItems($items) { $lines = []; + $n = count($items); foreach ($items as $i => $item) { /* 获取菜单项的自定义属性 */ $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); $tag = ArrayHelper::remove($options, 'tag', 'li'); $class = []; - if ($item['active']) { + if (isset($item['active'])) { $class[] = $this->activeCssClass; if (isset($item['items'])) { $class[] = $this->menuOpenClass; diff --git a/yii b/yii new file mode 100755 index 0000000..b93b5cf --- /dev/null +++ b/yii @@ -0,0 +1,24 @@ +#!/usr/bin/env php +run(); +exit($exitCode);