Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-index value returned from getRawDataRealms function #1468

Merged
merged 3 commits into from
Dec 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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