diff --git a/classes/output/navigation/primary.php b/classes/output/navigation/primary.php index 70d0b4a6ea6..b93e626f013 100644 --- a/classes/output/navigation/primary.php +++ b/classes/output/navigation/primary.php @@ -57,6 +57,20 @@ public function __construct($page) { parent::__construct($page); } + /** + * Override the parent function, so that it also works with associative arrays. + * + * @param object|array $node + * @param bool $expandedmenu + * @return bool + */ + protected function flag_active_nodes(object|array $node, bool $expandedmenu = false): bool { + if (is_array($node)) { + $node = (object) $node; + } + return parent::flag_active_nodes($node, $expandedmenu); + } + /** * Combine the various menus into a standardized output. *