Skip to content

Commit

Permalink
Merge pull request #171 from ppetpadriew/fix_unitialized_offset_0
Browse files Browse the repository at this point in the history
fix: unitialized offset 0
  • Loading branch information
schmunk42 authored Jul 24, 2018
2 parents 613821a + b218aad commit c96336e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widgets/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected function isItemActive($item)
{
if (isset($item['url']) && is_array($item['url']) && isset($item['url'][0])) {
$route = $item['url'][0];
if ($route[0] !== '/' && Yii::$app->controller) {
if (isset($route[0]) && $route[0] !== '/' && Yii::$app->controller) {
$route = ltrim(Yii::$app->controller->module->getUniqueId() . '/' . $route, '/');
}
$route = ltrim($route, '/');
Expand Down

0 comments on commit c96336e

Please sign in to comment.