Skip to content

Commit

Permalink
Fixing a php error for an invalid id property
Browse files Browse the repository at this point in the history
  • Loading branch information
Jako committed Jan 24, 2019
1 parent 1660778 commit 3731446
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/model/modx/processors/element/category/getlist.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ public function iterate(array $data) {
} else {
$category = array_shift($data['results']);

$categoryArray = $category->toArray();
$categoryName = $category->get('category');
if ($category) {
$categoryArray = $category->toArray();
$categoryName = $category->get('category');

$categoryArray['name'] = $this->includeCategoryParent($category->Parent, $categoryName);
$categoryArray['name'] = $this->includeCategoryParent($category->Parent, $categoryName);
} else {
$categoryArray = array();
}

$list[] = $categoryArray;
}
Expand Down

0 comments on commit 3731446

Please sign in to comment.