diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a906ea..7e414b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ use [Keep a Changelog] (http://keepachangelog.com/). ### Fixed - Fixed `Config::getArrayCopy()` with no config +- Fixed reverse of configs in `Config::getArrayCopy()` ## [2.0.0-beta2] - 2021-04-14 diff --git a/src/Config.php b/src/Config.php index 4ebf811..e2b73a7 100644 --- a/src/Config.php +++ b/src/Config.php @@ -162,7 +162,7 @@ public function getArrayCopy(bool $compiled = false): array } $configArrays = array_map(fn(ConfigInterface $config) => $config->getArrayCopy(), $this->configs); - rsort($configArrays); + $configArrays = array_reverse($configArrays); $configArray = b_array_merge_recursive(...$configArrays); unset($configArrays);