Commit c74db68c by Qiang Xue

Fixes #1974.

parent 56ab3476
...@@ -202,7 +202,7 @@ class Nav extends Widget ...@@ -202,7 +202,7 @@ 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) { foreach (array_splice($item['url'], 1) as $name => $value) {
if (!isset($this->params[$name]) || $this->params[$name] != $value) { if ($value !== null && (!isset($this->params[$name]) || $this->params[$name] != $value)) {
return false; return false;
} }
} }
......
...@@ -295,7 +295,7 @@ class Menu extends Widget ...@@ -295,7 +295,7 @@ class Menu 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) { foreach (array_splice($item['url'], 1) as $name => $value) {
if (!isset($this->params[$name]) || $this->params[$name] != $value) { if ($value !== null && (!isset($this->params[$name]) || $this->params[$name] != $value)) {
return false; return false;
} }
} }
......
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