File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi
44
55## [ Unreleased] [ unreleased ]
66
7+ ## [ 0.1.17] - 2022-01-27
8+
9+ ### Fixed
10+
11+ - Removed additional "0" site in the array returned from ` Dotenv::getSites ` .
12+
713## [ 0.1.16] - 2022-01-26
814
915### Fixed
@@ -120,7 +126,8 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi
120126
121127** Initial release!**
122128
123- [ unreleased ] : https://github.com/unleashedtech/dotenv-drupal/compare/0.1.16...main
129+ [ unreleased ] : https://github.com/unleashedtech/dotenv-drupal/compare/0.1.17...main
130+ [ 0.1.17 ] : https://github.com/unleashedtech/dotenv-drupal/compare/0.1.16...0.1.17
124131[ 0.1.16 ] : https://github.com/unleashedtech/dotenv-drupal/compare/0.1.15...0.1.16
125132[ 0.1.15 ] : https://github.com/unleashedtech/dotenv-drupal/compare/0.1.14...0.1.15
126133[ 0.1.14 ] : https://github.com/unleashedtech/dotenv-drupal/compare/0.1.13...0.1.14
Original file line number Diff line number Diff line change @@ -321,13 +321,15 @@ public function getSettings(): array
321321 */
322322 public function getSites (): array
323323 {
324- $ domains = explode (', ' , $ _SERVER ['DOMAINS ' ] ?? 'default.example ' );
325- $ sites = explode (', ' , $ _SERVER ['SITES ' ] ?? 'default ' );
326- foreach ($ sites as $ site ) {
324+ $ domains = \explode (', ' , $ _SERVER ['DOMAINS ' ] ?? 'default.example ' );
325+ $ siteNames = \explode (', ' , $ _SERVER ['SITES ' ] ?? 'default ' );
326+ $ sites = [];
327+ foreach ($ siteNames as $ siteName ) {
327328 foreach ($ domains as $ domain ) {
328- $ sites [$ site . '. ' . $ domain ] = $ site ;
329+ $ sites [$ siteName . '. ' . $ domain ] = $ siteName ;
329330 }
330331 }
332+
331333 return $ sites ;
332334 }
333335
You can’t perform that action at this time.
0 commit comments