From 7b1a188cfe59a54fc70d12f02b9477c71b7ccec4 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 22 Jul 2021 16:59:42 +0300 Subject: [PATCH] Fixed error in `loadDirectoryConfig()` if configuration hasn't been saved [#3409] --- CHANGELOG.md | 1 + system/src/Grav/Framework/Flex/FlexDirectory.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bd90ca7d..63c82381b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ 1. [](#bugfix) * Fixed `Warning: Undefined array key "SERVER_SOFTWARE" in index.php` [#3408](https://github.com/getgrav/grav/issues/3408) + * Fixed error in `loadDirectoryConfig()` if configuration hasn't been saved [#3409](https://github.com/getgrav/grav/issues/3409) # v1.7.18 ## 07/19/2021 diff --git a/system/src/Grav/Framework/Flex/FlexDirectory.php b/system/src/Grav/Framework/Flex/FlexDirectory.php index 8d8dd1e64..adbfce6d2 100644 --- a/system/src/Grav/Framework/Flex/FlexDirectory.php +++ b/system/src/Grav/Framework/Flex/FlexDirectory.php @@ -241,7 +241,7 @@ class FlexDirectory implements FlexDirectoryInterface if (str_starts_with($uri, 'config://')) { $path = strtr(substr($uri, 9, -5), '/', '.'); - return $grav['config']->get($path); + return (array)$grav['config']->get($path); } // Load the configuration file.