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

Explicitly cast potentiall nulls to array for array_merge() #756

Merged
merged 2 commits into from
Dec 20, 2018

Conversation

smgallo
Copy link
Contributor

@smgallo smgallo commented Dec 20, 2018

Description

If resource codes are specified for either inclusion or exclusion the mapping between resource codes and database ids is loaded and the resource codes are verified against this mapping. If only inclusion or exclusion resources were specified, a null would be passed to array_merge() causing an error. This PR casts the value to an array to mitigate this.

Motivation and Context

Fixes error when running ETL on XSEDE

Warning: array_merge(): Argument #1 is not an array in /data/www/xdmod/share/classes/ETL/EtlOverseer.php on line 185

Tests performed

Manual testing on XSEDE development instance.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@smgallo smgallo added bug Bugfixes Category:ETL Extract Transform Load labels Dec 20, 2018
@smgallo smgallo added this to the 8.1.0 milestone Dec 20, 2018
@smgallo smgallo requested review from eiffel777 and plessbd December 20, 2018 18:59
@smgallo smgallo changed the title Explicitly case potentiall nulls to array for array_merge() Explicitly cast potentiall nulls to array for array_merge() Dec 20, 2018
@smgallo smgallo merged commit 88f14af into ubccr:xdmod8.1 Dec 20, 2018
@smgallo smgallo deleted the fix-array-merge-errors branch December 20, 2018 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes Category:ETL Extract Transform Load
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants