From f9e7f1c08efa1adf694fd7ad56f9a782ccefdc13 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 30 Aug 2021 09:55:21 +0300 Subject: [PATCH] Flex: Use str_replace() and not strtr() --- CHANGELOG.md | 2 +- system/src/Grav/Framework/Flex/FlexDirectory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01211d896..4c0f367e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ * Added meta support for `UploadedFile` class * Added support for multiple mime-types per file extension [#3422](https://github.com/getgrav/grav/issues/3422) * Added `setCurrent()` method to Page Collection [#3398](https://github.com/getgrav/grav/pull/3398) - * Initialize `$grav['uri]` before session + * Initialize `$grav['uri']` before session 3. [](#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) diff --git a/system/src/Grav/Framework/Flex/FlexDirectory.php b/system/src/Grav/Framework/Flex/FlexDirectory.php index 402c9746d..43fe00081 100644 --- a/system/src/Grav/Framework/Flex/FlexDirectory.php +++ b/system/src/Grav/Framework/Flex/FlexDirectory.php @@ -239,7 +239,7 @@ class FlexDirectory implements FlexDirectoryInterface // If configuration is found in main configuration, use it. if (str_starts_with($uri, 'config://')) { - $path = strtr(substr($uri, 9, -5), '/', '.'); + $path = str_replace('/', '.', substr($uri, 9, -5)); return (array)$grav['config']->get($path); }