xavierlacot/sfDoctrineRestGeneratorPlugin — pull request #36 by nederdirk (2014-06-04 08:19:17+00:00)
Title: Don't send decoding error on empty json object

When the payload PUT or POST requests is an empty JSON object (`{}`), the REST module throws an exception (yielding a 500 Internal Server Error at the HTTP level) with the message that the payload is not valid JSON. `{}` however is valid JSON, and `json_decode` returns an empty array.
Since `array()` is falsy in PHP, the error was triggered incorrectly. Comparing with `===` solves this