Commit 2fc1a382 by Alexander Makarov

Merge branch 'arturf-master'

parents d7a251bb ad7f7c43
...@@ -65,6 +65,7 @@ Yii Framework 2 Change Log ...@@ -65,6 +65,7 @@ Yii Framework 2 Change Log
- Enh #3574: Add integrity check support for SQLite (zeeke) - Enh #3574: Add integrity check support for SQLite (zeeke)
- Enh #3597: Nested array support for HTML5 custom "data-*" attributes (armab) - Enh #3597: Nested array support for HTML5 custom "data-*" attributes (armab)
- Enh #3607: Added support for limit in migrations actions: history, new, redo (Ragazzo) - Enh #3607: Added support for limit in migrations actions: history, new, redo (Ragazzo)
- Enh #3636: Hide menu container tag with empty items in `yii\widgets\Menu` (arturf)
- Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue) - Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue)
- Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue) - Enh: Supported adding a new response formatter without the need to reconfigure existing formatters (qiangxue)
- Enh: Added `yii\web\UrlManager::addRules()` to simplify adding new URL rules (qiangxue) - Enh: Added `yii\web\UrlManager::addRules()` to simplify adding new URL rules (qiangxue)
......
...@@ -166,9 +166,11 @@ class Menu extends Widget ...@@ -166,9 +166,11 @@ class Menu extends Widget
$this->params = Yii::$app->request->getQueryParams(); $this->params = Yii::$app->request->getQueryParams();
} }
$items = $this->normalizeItems($this->items, $hasActiveChild); $items = $this->normalizeItems($this->items, $hasActiveChild);
$options = $this->options; if (!empty($items)) {
$tag = ArrayHelper::remove($options, 'tag', 'ul'); $options = $this->options;
echo Html::tag($tag, $this->renderItems($items), $options); $tag = ArrayHelper::remove($options, 'tag', 'ul');
echo Html::tag($tag, $this->renderItems($items), $options);
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment