Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Only process needed request values #430

Merged
merged 3 commits into from
Apr 6, 2020
Merged

Conversation

andrewscofield
Copy link
Contributor

I was getting a PHP compile error on implode because I was sending other data through the an API route. Meaning I had payload data in my request and this function was not processing it correctly.

Note: I'm not entirely sure that $shopify_values actually contains all the values needed.

I was getting a PHP compile error on `implode` because I was sending other data through the an API route. Meaning I had payload data in my request and this function was not processing it correctly.
@gnikyt
Copy link
Owner

gnikyt commented Mar 25, 2020

The problem with $request->all() is it returns both post and get doesn't it?

I think maybe if we change it to $request->query() would be better as we would only grab the query vars, not post?

@andrewscofield
Copy link
Contributor Author

Yea that is the issue I'm running into. Although, I don't know why anybody would use it, I think query vars can also be an array, so it would also through the same error if it ever encountered a complex set of query vars.

https://www.php.net/manual/en/function.http-build-query.php (Example 3)

@gnikyt
Copy link
Owner

gnikyt commented Mar 25, 2020 via email

@gnikyt
Copy link
Owner

gnikyt commented Apr 2, 2020

@andrewscofield Sorry, I've been super tied up. Are you able to mod your PR to use query and not all?

@andrewscofield
Copy link
Contributor Author

Got it changed and its working great for me.

@gnikyt
Copy link
Owner

gnikyt commented Apr 6, 2020

Awesome, thanks man

@gnikyt gnikyt merged commit a371497 into gnikyt:master Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants