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

fix(array-to-string-conversion): Fix array to string conversion error in webhook registration #361

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

crisalice
Copy link
Contributor

@crisalice crisalice commented Aug 6, 2024

WHY are these changes introduced?

While checking a webhook record, an "Array to string conversion" error was encountered. This error occurs when the code tries to concatenate or output an array directly as a string. In this specific case, the $checkBody variable was being used directly inside a string, causing the error.

WHAT is this pull request doing?

This pull request addresses and resolves the "Array to string conversion" error that occurs during the webhook registration check in the application. The error was caused by attempting to concatenate an array directly within a string.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have updated the documentation for public APIs from the library (if applicable)

@crisalice
Copy link
Contributor Author

I have signed the CLA!

1 similar comment
@crisalice
Copy link
Contributor Author

I have signed the CLA!

Copy link
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

Thank you for contributing! I just have one minor nit: could we move line 193 inside the if block, so we're not always converting the payload back to a string?

@crisgoncalves-mdi
Copy link
Contributor

Thank you for the feedback! I've adjusted and moved the string conversion to line 193 inside the if block.

Copy link
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

Thank you!

@paulomarg paulomarg merged commit bb92e4a into Shopify:main Aug 13, 2024
4 checks passed
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