From 60ab5cefd09cee85fc07cf4d0ab8416c02b15fdc Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 29 Jan 2016 18:32:46 +0100 Subject: [PATCH] :construction: 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 --- system/src/Grav/Common/Page/Pages.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 3d3fd3587..307bf8d61 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -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(); }