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

Conversation

eiffel777
Copy link
Contributor

The elements returned from array_filter preserve their keys. This can cause gaps in the numeric key values which can cause the json_encode function to return a object instead of an array. This can happen to the CCR.xdmod.ui.rawDataAllowedRealms variable in index.php. array_keys is used to re-index the keys and prevent this.

Tests performed

Tested in docker and also on xdmod-dev where the issues was causing a bug

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@eiffel777 eiffel777 added bug Bugfixes Category:General General labels Dec 15, 2020
@eiffel777 eiffel777 added this to the 9.5.0 milestone Dec 15, 2020
@eiffel777 eiffel777 self-assigned this Dec 15, 2020
@eiffel777 eiffel777 merged commit 4b05b1c into ubccr:xdmod9.5 Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes Category:General General
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants