🚧 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:
Flavio Copes
2016-01-29 18:32:46 +01:00
parent 793f14c3e0
commit 60ab5cefd0

View File

@@ -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();
}