zikula-modules / DizkusModule

Official repository for Dizkus, a fully integrated forum solution for Zikula 1.4+
21 stars 7 forks source link

Notice: Undefined index: func in dev mode #287

Closed Kaik closed 8 years ago

Kaik commented 8 years ago

Ok, mentioned on slack smarty error does occur only in dev mode in both master and 4.0.0 and it looks like this

Notice: Undefined index: func
500 Internal Server Error - ContextErrorException
smarty_core_load_plugins(array('plugins' => array(array('function', 'gt', 'User/navbar.tpl', 4, false),array('function', 'route', 'User/navbar.tpl', 4, false),array('function', 'modapifunc', 'User/navbar.tpl', 20, false),array('function', 'modurl', 'User/navbar.tpl', 56, false),array('modifier', 'safehtml', 'User/navbar.tpl', 12, false),array('modifier', 'notifyfilters', 'User/navbar.tpl', 12, false),array('modifier', 'dateformat', 'User/navbar.tpl', 24, false),array('modifier', 'cat', 'User/navbar.tpl', 53, false),array('modifier', 'urlencode', 'User/navbar.tpl', 53, false),array('block', 'checkpermissionblock', 'User/navbar.tpl', 62, false),)), $this); ?>
<ol class="breadcrumb clearfix">
    <li>
    <?php if (( $_GET['func'] != 'index' )): ?>
        <a class="tooltips fa fa-home" title="<?php echo smarty_function_gt(array('text' => 'Go to forums index page'), $this);?>
" href="<?php echo smarty_function_route(array('name' => 'zikuladizkusmodule_user_index'), $this);?>
">&nbsp;<?php echo smarty_function_gt(array('text' => 'Forums index page'), $this);?>

It is caused by this line https://github.com/zikula-modules/DizkusModule/blob/master/Resources/views/User/navbar.tpl#L3