Skip to content

Commit

Permalink
Merge pull request #1468 from eiffel777/fix-rawDataAllowedRealms-vari…
Browse files Browse the repository at this point in the history
…able

Re-index value returned from getRawDataRealms function
  • Loading branch information
eiffel777 authored Dec 15, 2020
2 parents 1c325d7 + 33c4e58 commit 4b05b1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion classes/DataWarehouse/Data/RawStatisticsConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public function getRawDataRealms()
return [];
}

return array_filter(
// The elements returned from array filter preserve their keys. This
// may cause gaps since the keys are numeric. array_keys is used below
// to reindex the keys
$rawDataRealms = array_filter(
$this->config['realms'],
function ($realm) {
// If the "raw_data" key doesn't exist the realm is assumed to
Expand All @@ -106,6 +109,8 @@ function ($realm) {
&& $realm['raw_data'] === false);
}
);

return array_values($rawDataRealms);
}

/**
Expand Down

0 comments on commit 4b05b1c

Please sign in to comment.