Fixed bug in #791

You were encoding an already encoded json =)
Merge pull request #1028 from roman-tsiupa-sociomantic/patch-1

PHP: Fix validation error