[-] IN : remove warnings while upgrading
This commit is contained in:
@@ -28,8 +28,9 @@ function generate_ntree()
|
||||
{
|
||||
$categories = Db::getInstance()->executeS('SELECT id_category, id_parent FROM '._DB_PREFIX_.'category ORDER BY id_parent ASC, position ASC');
|
||||
$categoriesArray = array();
|
||||
foreach ($categories AS $category)
|
||||
$categoriesArray[(int)$category['id_parent']]['subcategories'][(int)$category['id_category']] = 1;
|
||||
if (is_array($categories))
|
||||
foreach ($categories AS $category)
|
||||
$categoriesArray[(int)$category['id_parent']]['subcategories'][(int)$category['id_category']] = 1;
|
||||
$n = 1;
|
||||
generate_ntree_subTree($categoriesArray, 1, $n);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user