Skip to content

Commit

Permalink
Fixed errors with accessing object as array
Browse files Browse the repository at this point in the history
  • Loading branch information
lux committed Dec 21, 2023
1 parent 98f58ee commit 89c9215
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/navigation/handlers/hook/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
$n = new Navigation;
$node = $n->node ($this->data['page']);
if ($node) {
$node['data'] = (! empty ($this->data['menu_title'])) ? $this->data['menu_title'] : $this->data['title'];
$node->data = (! empty ($this->data['menu_title'])) ? $this->data['menu_title'] : $this->data['title'];
if ($this->data['page'] != $this->data['id']) {
// Update ID if renamed
$node['attr']['id'] = $this->data['id'];
$node->attr['id'] = $this->data['id'];
}
$n->save ();

Expand Down
2 changes: 1 addition & 1 deletion apps/navigation/handlers/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
if (is_object ($section->children)) {
$section->children = (array) $section->children;
}
navigation_print_level ($section['children']);
navigation_print_level ($section->children);
} else {
navigation_print_level ($n->tree);
}

0 comments on commit 89c9215

Please sign in to comment.