diff --git a/library/Unl/View/Helper/WdnTemplate.php b/library/Unl/View/Helper/WdnTemplate.php index e6b510c70851a5b2bb6f4055cf0fa3344a593473..8055f1bce2d499903c4ca455c8d9fbb8f7df2367 100644 --- a/library/Unl/View/Helper/WdnTemplate.php +++ b/library/Unl/View/Helper/WdnTemplate.php @@ -185,14 +185,20 @@ EOF; } $html = '<ul>' . PHP_EOL; foreach ($links as $link) { - $html .= '<li>' - . (isset($link['href']) ? '<a href="' . $this->_processUrl($link['href']) . '">' : '') - . $link['text'] - . (isset($link['href']) ? '</a>' : ''); - if (isset($link['children'])) { - $html .= PHP_EOL . $this->_processLinks($link['children']); - } - $html .= '</li>' . PHP_EOL; + if (is_array($link)) { + $html .= '<li>' + . (isset($link['href']) ? '<a href="' . $this->_processUrl($link['href']) . '">' : '') + . $link['text'] + . (isset($link['href']) ? '</a>' : ''); + if (isset($link['children'])) { + $html .= PHP_EOL . $this->_processLinks($link['children']); + } + $html .= '</li>' . PHP_EOL; + } else { + $html .= '<li>' + . $link + . '</li>' . PHP_EOL; + } } $html .= '</ul>' . PHP_EOL;