diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 22997ee2f..7bf8fb0f2 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -122,8 +122,8 @@ WHERE '.$where.' ), 'URL' => make_index_url(array('category' => $row)), 'LEVEL' => substr_count($row['global_rank'], '.') + 1, - 'SELECTED' => $selected_category['id'] == $row['id'] ? true : false, - 'IS_UPPERCAT' => $selected_category['id_uppercat'] == $row['id'] ? true : false, + 'SELECTED' => ($selected_category!==null && $selected_category['id'] == $row['id']) ? true : false, + 'IS_UPPERCAT' => ($selected_category!==null && $selected_category['id_uppercat'] == $row['id']) ? true : false, ) ); if ($conf['index_new_icon']) @@ -602,4 +602,4 @@ function remove_computed_category(&$cats, $cat) unset($cats[$cat['cat_id']]); } -?> \ No newline at end of file +?> diff --git a/include/smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php b/include/smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php index 5a125a4a7..6897fb33e 100644 --- a/include/smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php +++ b/include/smarty/libs/sysplugins/smarty_internal_runtime_updatescope.php @@ -47,7 +47,9 @@ class Smarty_Internal_Runtime_UpdateScope while (isset($ptr->parent)) { $ptr = $ptr->parent; } - $ptr->tpl_vars[$varName] = $tpl->tpl_vars[$varName]; + if ($ptr) { + $ptr->tpl_vars[$varName] = $tpl->tpl_vars[$varName]; + } } } }