Browse Source

Fixed incorrect URL config processing at `yii\bootstrap\Nav::items` if route element is not a first one

tags/2.0.4
Klimov Paul 10 years ago
parent
commit
b91b32530e
  1. 1
      CHANGELOG.md
  2. 4
      Nav.php

1
CHANGELOG.md

@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
- Bug #18: `label` option ignored by `yii\bootstrap\Activefield::checkbox()` and `yii\bootstrap\Activefield::radio()` (mikehaertl) - Bug #18: `label` option ignored by `yii\bootstrap\Activefield::checkbox()` and `yii\bootstrap\Activefield::radio()` (mikehaertl)
- Bug #5984: `yii\bootstrap\Activefield::checkbox()` caused browser to link label to the wrong input (cebe) - Bug #5984: `yii\bootstrap\Activefield::checkbox()` caused browser to link label to the wrong input (cebe)
- Bug #7894: Fixed incorrect URL config processing at `yii\bootstrap\Nav::items` if route element is not a first one (nkovacs, klimov-paul)
- Enh #29: Added support to list-groups for Collapse class (pana1990, skullcrasher) - Enh #29: Added support to list-groups for Collapse class (pana1990, skullcrasher)
- Enh #2546: Added `visible` option to `yii\bootstrap\ButtonGroup::$buttons` (samdark, lukBarros) - Enh #2546: Added `visible` option to `yii\bootstrap\ButtonGroup::$buttons` (samdark, lukBarros)
- Enh #7633: Added `ActionColumn::$buttonOptions` for defining HTML options to be added to the default buttons (cebe) - Enh #7633: Added `ActionColumn::$buttonOptions` for defining HTML options to be added to the default buttons (cebe)

4
Nav.php

@ -252,7 +252,9 @@ class Nav extends Widget
} }
unset($item['url']['#']); unset($item['url']['#']);
if (count($item['url']) > 1) { if (count($item['url']) > 1) {
foreach (array_splice($item['url'], 1) as $name => $value) { $params = $item['url'];
unset($params[0]);
foreach ($params as $name => $value) {
if ($value !== null && (!isset($this->params[$name]) || $this->params[$name] != $value)) { if ($value !== null && (!isset($this->params[$name]) || $this->params[$name] != $value)) {
return false; return false;
} }

Loading…
Cancel
Save