Skip to content

Commit

Permalink
Fixed reverse of configs in Config::getArrayCopy()
Browse files Browse the repository at this point in the history
  • Loading branch information
ElGigi committed Jun 7, 2021
1 parent ffb1fbd commit 319fe65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 319fe65

Please sign in to comment.