-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support for lower case headers in pagination #57
base: master
Are you sure you want to change the base?
Conversation
In some cases the webserver only return lower case headers which leads to an error being thrown when the pagination tries to index the array with headers. This adds methods to fix this issue.
src/WoocommerceClient.php
Outdated
* | ||
* @return string | ||
*/ | ||
public function getHeaderWithCase($header) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening brace should be on a new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
/** | ||
* @test | ||
*/ | ||
public function headers_are_converted_to_lower_case_when_requested() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method name WoocommerceClientTest::headers_are_converted_to_lower_case_when_requested
is not in camel caps format
@pixelpeter This pull request has been sitting here for a bit over a year now. Seems to be a problem for more people than me. Any reason for it not being merged? Thanks! |
In some cases the webserver only return lowercase headers which leads to an error being thrown when the pagination tries to index the array with headers.
This adds methods to fix this issue.