Skip to content

Conversation

@sniemetz
Copy link

@sniemetz sniemetz commented Apr 3, 2025

used wrong argument to build category tree

@thorsten thorsten self-assigned this Apr 4, 2025
@thorsten thorsten added the Bug label Apr 4, 2025
@thorsten thorsten added this to the 4.1 milestone Apr 4, 2025
$categoryOrder = $this->container->get('phpmyfaq.category.order');
$orderedCategories = $categoryOrder->getAllCategories();
$categoryTree = $categoryOrder->getCategoryTree($orderedCategories);
$orderedCategories = $categoryOrder->getAllCategories();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


foreach ($categories as $category) {
if ((int) $category['parent_id'] === $parentId) {
$children = $this->getCategoryTree($categories, $category['category_id']);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks wrong, please also check the comment below.

@thorsten thorsten closed this May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants