New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Encode Failed #616
Comments
I believe this is usually indicating a malformed UTF-8 message yes, but maybe I made a mistake, can you link to that SncRedis issue? |
I don't know if this is relevant, but there are a bunch of options that you can use with I would note that this is a pain in PHP as it's not obvious that you need these options for things to work and |
I'm gonna assume this gets fixed by #683 as there is no clear repro case I can't verify but it most likely is covered too. @ckmaresca for the record, JSON_HEX and JSON_UNESCAPED do nothing to prevent these errors unfortunately, they merely tweak the way things are encoded by default, but that only concerns valid UTF-8 strings. Non-UTF-8 can not be encoded to json as the format mandates Unicode strings. |
JSON encoding failed: Malformed UTF-8 characters, possibly incorrectly encoded. Encoding: array (
I upgraded my symfony composer files lately, and got this error. This does not happen in 1.14.0. The latest change in "Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only)" caused this error.
I am using this in conjunction with SNCRedis Bundle to store sessions in redis.
Is there any way sncredisbundle can utf8_encode the log message?
The session is saved fine and everything else works, its purely the logging.
I have also created a bug at SncRedisBundle git because it may be an issue with their code.
The text was updated successfully, but these errors were encountered: