mirror of
https://github.com/getgrav/grav.git
synced 2026-01-29 19:00:12 +01:00
🚧 Reset instances, children and routes properties in Pages::init() prior to calling buildPages()
Useful when calling Pages::init() multiple times, or the properties are never reset and the subsequent buildPages() calls fail
This commit is contained in:
@@ -126,6 +126,10 @@ class Pages
|
||||
$this->ignore_folders = $config->get('system.pages.ignore_folders');
|
||||
$this->ignore_hidden = $config->get('system.pages.ignore_hidden');
|
||||
|
||||
$this->instances = [];
|
||||
$this->children = [];
|
||||
$this->routes = [];
|
||||
|
||||
$this->buildPages();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user