sajari / sdk-php

Official repository of the Search.io SDK for PHP
https://www.search.io
MIT License
8 stars 1 forks source link

Empty meta is passed as an array instead of an object, we need to enforce an object #16

Closed mish15 closed 7 years ago

mish15 commented 8 years ago

Need to use JSON_FORCE_OBJECT

If the meta field is empty it is passed as an array instead of an object, it then cannot be unpacked into a map and the JSON decoding fails. This shouldn't be possible. If empty it should either not be sent or should be sent as an object.

tbillington commented 7 years ago

This doesn't apply to the new version.