Skip to content

Commit

Permalink
Return early if no nested categories retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxayl committed Sep 27, 2024
1 parent 1171475 commit 23abf26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ps_categorytree.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ private function getCategories($category): array

// Retrieve them using the built in method
$categories = Category::getNestedCategories($category->id, $this->context->language->id, true, $groups, true, $sqlFilter, $orderBy);
if (empty($categories)) {
return [];
}

// Get path to current category so we can use it for marking
$idsOfCategoriesInPath = $this->getIdsOfCategoriesInPathToCurrentCategory();
Expand Down

0 comments on commit 23abf26

Please sign in to comment.