diff --git a/CHANGELOG.md b/CHANGELOG.md index d9684606c..8d5fc9a63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ * Fix for `avatar_url` provided by 3rd party providers * Fixed non standard `lang` code lengths in `Utils` and `Session` detection * Fixed saving a new object in Flex `SimpleStorage` + * Fixed exception in `Flex::getDirectories()` if the first parameter is set # v1.6.8 ## 04/23/2019 diff --git a/system/src/Grav/Framework/Flex/Flex.php b/system/src/Grav/Framework/Flex/Flex.php index 8e71b2a84..e87e903e3 100644 --- a/system/src/Grav/Framework/Flex/Flex.php +++ b/system/src/Grav/Framework/Flex/Flex.php @@ -91,7 +91,7 @@ class Flex implements \Countable // Return the directories in the given order. $directories = []; foreach ($types as $type) { - $directories = $this->types[$type] ?? null; + $directories[$type] = $this->types[$type] ?? null; } return $keepMissing ? $directories : array_filter($directories);