Fixed: Undefined index issues in the Tab class
This commit is contained in:
@@ -503,11 +503,13 @@ class TabCore extends ObjectModel
|
||||
|
||||
public static function recursiveTab($id_tab, $tabs)
|
||||
{
|
||||
$admin_tab = Tab::getTab((int)Context::getContext()->language->id, $id_tab);
|
||||
$tabs[] = $admin_tab;
|
||||
if (isset($admin_tab['id_parent']) && !empty($admin_tab['id_parent'])) {
|
||||
$tabs = Tab::recursiveTab($admin_tab['id_parent'], $tabs);
|
||||
if ($admin_tab = Tab::getTab((int)Context::getContext()->language->id, $id_tab)) {
|
||||
$tabs[] = $admin_tab;
|
||||
if (isset($admin_tab['id_parent']) && $admin_tab['id_parent'] > 0) {
|
||||
$tabs = Tab::recursiveTab($admin_tab['id_parent'], $tabs);
|
||||
}
|
||||
}
|
||||
|
||||
return $tabs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user