From cff4e225e650213d11244f5176934e2da2cce043 Mon Sep 17 00:00:00 2001 From: Gert Date: Mon, 20 Apr 2015 20:53:26 +0200 Subject: [PATCH] fix bug in collection filtering --- system/src/Grav/Common/Page/Collection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Collection.php b/system/src/Grav/Common/Page/Collection.php index 59302b781..9cd237c04 100644 --- a/system/src/Grav/Common/Page/Collection.php +++ b/system/src/Grav/Common/Page/Collection.php @@ -361,12 +361,13 @@ class Collection extends Iterator { $routable = []; - foreach (array_keys($this->items) as $path => $slug) { + foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page->routable()) { $routable[$path] = $slug; } } + $this->items = $routable; return $this; }