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

typecast vars to ensure the value is an array #475

Conversation

jordyrosenbrand
Copy link
Contributor

The method callMiddleware expects the fourth parameter to be an array while in the method queryAndReturnResult it can be either an array or null.

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Good catch. Just a small change to make.

Can you please also retarget on the 4.0 branch?

src/QueryHandler/QueryHandler.php Outdated Show resolved Hide resolved
Use null coalescing operator with an empty array instead of typecasting into an array

Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com>
@GuySartorelli GuySartorelli changed the base branch from 4 to 4.0 June 22, 2022 07:28
@GuySartorelli
Copy link
Member

The travis failure is also reflected on the 4 branch itself so it not related to this PR: https://app.travis-ci.com/github/silverstripe/silverstripe-graphql/jobs/573407968#L1976

@GuySartorelli GuySartorelli merged commit b071f8f into silverstripe:4.0 Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants