You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@autowp I've made the change a bit more generic. It does not depend now on the content-type, as it was before. In case we have one element with empty value we are checking if the last character of the content is =. If so, then it is "correct" urlencoded content and we return array, as expected.
In case we have any string without = it will return this string, not an array.
In general I think it should be completely changed to work properly with the given content type correctly, as now this is quite hacky, imo.
Controller/AbstractRestfulController
There is no way to PUT/PATCH object with single field to empty value.
Request payload is interpreted as string (
$data = 'name=';
) regardless Content-Type.Proper value is
$data = ['name' => ''];
I think ideally is split behaviour by Content-Type but that follows to huge BC. (see testCanReceiveStringAsRequestContent)
My pull request handle just one situation (example above) by header.
Originally posted by @autowp at zendframework/zend-mvc#251
The text was updated successfully, but these errors were encountered: