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
An exception should be thrown if PHP fails to decode a json string. It's possible for ElasticSearch to return a bad string.
In ES one can insert a record as follows:
curl -XPOST -d '{ field : "data"}'
When the correct way would be:
curl -XPOST -d '{ "field" : "data"}'
Note the double quotes around the field name. ES accepts this and returns "ok", "true". When querying from the PHP client ES returns the faulty json string and the client isn't able to decode it, the program execution continues and stops with a 'Call to undefined method query() in Sherlock/Sherlock'
The text was updated successfully, but these errors were encountered:
Interesting, this is indeed bad behavior. Sherlock should definitely throw exceptions on json errors, rather than allowing execution to continue. I'll look into it later this week when I get a chance.
An exception should be thrown if PHP fails to decode a json string. It's possible for ElasticSearch to return a bad string.
In ES one can insert a record as follows:
curl -XPOST -d '{ field : "data"}'
When the correct way would be:
curl -XPOST -d '{ "field" : "data"}'
Note the double quotes around the field name. ES accepts this and returns "ok", "true". When querying from the PHP client ES returns the faulty json string and the client isn't able to decode it, the program execution continues and stops with a 'Call to undefined method query() in Sherlock/Sherlock'
The text was updated successfully, but these errors were encountered: