Skip to content

Conversation

@Loic-Rameau
Copy link

The middleware trigger a fatal error if the request body is empty, i came accros the problem so i came to share the resolution.

@Tucker-Eric
Copy link
Owner

I think the error may be before that when trying to call simplexml_load_string in the xml() method here: https://github.com/Tucker-Eric/laravel-xml-middleware/blob/master/src/XmlRequestServiceProvider.php#L27

Would you be able to update this pr to check for the content there and then return an empty object or array based on the $assoc paramater?

@Tucker-Eric
Copy link
Owner

Resolved in #7

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.

2 participants