From c49f7d0797eca457e140c2397a83618c6248d11b Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 13 Dec 2020 11:33:42 +0300 Subject: [PATCH] feat(entries): Entries API fetch improvements. #491 --- src/flextype/Foundation/Entries/Entries.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/flextype/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php index b23c8b06..3a4fbb24 100755 --- a/src/flextype/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -197,8 +197,8 @@ class Entries // Find entries in the filesystem $entries = find($this->getDirectoryLocation($this->storage['fetch_collection']['id']), isset($this->storage['fetch_collection']['options']['find']) ? - $this->storage['fetch_collection']['options']['find'] : - []); + $this->storage['fetch_collection']['options']['find'] : + []); // Walk through entries results if ($entries->hasResults()) { @@ -224,8 +224,10 @@ class Entries // Apply filter for fetch data $this->storage['fetch_collection']['data'] = filter($this->storage['fetch_collection']['data'], isset($this->storage['fetch_collection']['options']['filter']) ? - $this->storage['fetch_collection']['options']['filter'] : - []); + $this->storage['fetch_collection']['options']['filter'] : + isset($options['filter']) ? $options['filter'] : []); + + }